mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +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
|
||||
|
||||
// make our new process group the foreground group on the pty
|
||||
int pgrp = getpid();
|
||||
#if defined(_POSIX_VERSION)
|
||||
tcsetpgrp(d->slaveFd, pgrp);
|
||||
#elif defined(TIOCSPGRP)
|
||||
ioctl(d->slaveFd, TIOCSPGRP, (char *)&pgrp);
|
||||
#endif
|
||||
::tcsetpgrp(d->slaveFd, ::getpid());
|
||||
}
|
||||
|
||||
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;
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_UTMP_UT_PID
|
||||
l_struct.ut_pid = getpid();
|
||||
l_struct.ut_pid = ::getpid();
|
||||
#endif
|
||||
#ifdef HAVE_STRUCT_UTMP_UT_SESSION
|
||||
l_struct.ut_session = getsid(0);
|
||||
|
|
Loading…
Add table
Reference in a new issue