* 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:
François Revol
2008-01-11 13:34:06 +00:00
parent 3d424d5c73
commit dc935a5aa9
2 changed files with 3 additions and 4 deletions
-1
View File
@@ -62,7 +62,6 @@ bool
SftpClient::PrintWorkingDir(string& dir)
{
bool rc = false;
int len;
SendCommand("pwd\n");
BString reply;
return rc;
+3 -3
View File
@@ -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;