* warning
* save the fd so we can use it :) * open the pty read-write else it won't work... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23393 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -62,7 +62,6 @@ bool
|
||||
SftpClient::PrintWorkingDir(string& dir)
|
||||
{
|
||||
bool rc = false;
|
||||
int len;
|
||||
SendCommand("pwd\n");
|
||||
BString reply;
|
||||
return rc;
|
||||
|
||||
@@ -45,8 +45,8 @@ SpawningUploadClient::SpawnCommand()
|
||||
//XXX: should use a system-provided TerminalCommand class
|
||||
BString shellcmd = "exec";
|
||||
const char *args[] = { "/bin/sh", "-c", NULL, NULL };
|
||||
int pty = getpty(ptypath, ttypath);
|
||||
if (pty < 0)
|
||||
fPty = getpty(ptypath, ttypath);
|
||||
if (fPty < 0)
|
||||
return B_ERROR;
|
||||
|
||||
shellcmd << " 0<" << ttypath;
|
||||
@@ -117,7 +117,7 @@ SpawningUploadClient::getpty(char *pty, char *tty)
|
||||
{
|
||||
sprintf(pty, "/dev/pt/%c%c", major[i], minor[j]);
|
||||
sprintf(tty, "/dev/tt/%c%c", major[i], minor[j]);
|
||||
fd = open(pty, O_RDONLY|O_NOCTTY);
|
||||
fd = open(pty, O_RDWR|O_NOCTTY);
|
||||
if (fd >= 0)
|
||||
{
|
||||
return fd;
|
||||
|
||||
Reference in New Issue
Block a user