Add tcsetpgrp_nobg() which acts like tcsetpgrp() but returns -1
for a background process. This is safer than blocking SIGTTOU which would cause tcsetpgrp() to succeed in the background.
This commit is contained in:
@@ -271,4 +271,7 @@ int add_preserved_fd(struct preserved_fd_list *pfds, int fd);
|
||||
void closefrom_except(int startfd, struct preserved_fd_list *pfds);
|
||||
void parse_preserved_fds(struct preserved_fd_list *pfds, const char *fdstr);
|
||||
|
||||
/* setpgrp_nobg.c */
|
||||
int tcsetpgrp_nobg(int fd, pid_t pgrp_id);
|
||||
|
||||
#endif /* SUDO_SUDO_H */
|
||||
|
Reference in New Issue
Block a user