mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
assume tcsetpgrp() is available
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
86482a7909
commit
d4f1f1f270
1 changed files with 2 additions and 7 deletions
|
@ -410,12 +410,7 @@ void KPty::setCTty()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// make our new process group the foreground group on the pty
|
// make our new process group the foreground group on the pty
|
||||||
int pgrp = getpid();
|
::tcsetpgrp(d->slaveFd, ::getpid());
|
||||||
#if defined(_POSIX_VERSION)
|
|
||||||
tcsetpgrp(d->slaveFd, pgrp);
|
|
||||||
#elif defined(TIOCSPGRP)
|
|
||||||
ioctl(d->slaveFd, TIOCSPGRP, (char *)&pgrp);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KPty::login(const char *user, const char *remotehost)
|
void KPty::login(const char *user, const char *remotehost)
|
||||||
|
@ -472,7 +467,7 @@ void KPty::login(const char *user, const char *remotehost)
|
||||||
l_struct.ut_type = USER_PROCESS;
|
l_struct.ut_type = USER_PROCESS;
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_STRUCT_UTMP_UT_PID
|
#ifdef HAVE_STRUCT_UTMP_UT_PID
|
||||||
l_struct.ut_pid = getpid();
|
l_struct.ut_pid = ::getpid();
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_STRUCT_UTMP_UT_SESSION
|
#ifdef HAVE_STRUCT_UTMP_UT_SESSION
|
||||||
l_struct.ut_session = getsid(0);
|
l_struct.ut_session = getsid(0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue