* 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)
|
SftpClient::PrintWorkingDir(string& dir)
|
||||||
{
|
{
|
||||||
bool rc = false;
|
bool rc = false;
|
||||||
int len;
|
|
||||||
SendCommand("pwd\n");
|
SendCommand("pwd\n");
|
||||||
BString reply;
|
BString reply;
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ SpawningUploadClient::SpawnCommand()
|
|||||||
//XXX: should use a system-provided TerminalCommand class
|
//XXX: should use a system-provided TerminalCommand class
|
||||||
BString shellcmd = "exec";
|
BString shellcmd = "exec";
|
||||||
const char *args[] = { "/bin/sh", "-c", NULL, NULL };
|
const char *args[] = { "/bin/sh", "-c", NULL, NULL };
|
||||||
int pty = getpty(ptypath, ttypath);
|
fPty = getpty(ptypath, ttypath);
|
||||||
if (pty < 0)
|
if (fPty < 0)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
shellcmd << " 0<" << ttypath;
|
shellcmd << " 0<" << ttypath;
|
||||||
@@ -117,7 +117,7 @@ SpawningUploadClient::getpty(char *pty, char *tty)
|
|||||||
{
|
{
|
||||||
sprintf(pty, "/dev/pt/%c%c", major[i], minor[j]);
|
sprintf(pty, "/dev/pt/%c%c", major[i], minor[j]);
|
||||||
sprintf(tty, "/dev/tt/%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)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
return fd;
|
return fd;
|
||||||
|
|||||||
Reference in New Issue
Block a user