aboutsummaryrefslogtreecommitdiff
path: root/posix/spawn_int.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-01-27 10:11:30 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-02-02 08:34:16 -0300
commit6289d28d3c4e56f34830cfb011c31271ef850418 (patch)
tree32d0c4d7af2c5a6a9d293a1ea05eb0d45313e450 /posix/spawn_int.h
parent3f35e7d193b7ff098467996ebf85b19c41d6d86e (diff)
downloadglibc-6289d28d3c4e56f34830cfb011c31271ef850418.tar
glibc-6289d28d3c4e56f34830cfb011c31271ef850418.tar.gz
glibc-6289d28d3c4e56f34830cfb011c31271ef850418.tar.bz2
glibc-6289d28d3c4e56f34830cfb011c31271ef850418.zip
posix: Replace posix_spawnattr_tc{get,set}pgrp_np with posix_spawn_file_actions_addtcsetpgrp_np
The posix_spawnattr_tcsetpgrp_np works on a file descriptor (the controlling terminal), so it would make more sense to actually fit it on the file actions API. Also, POSIX_SPAWN_TCSETPGROUP is not really required since it is implicit by the presence of tcsetpgrp file action. The posix/tst-spawn6.c is also fixed when TTY can is not present. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'posix/spawn_int.h')
-rw-r--r--posix/spawn_int.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/posix/spawn_int.h b/posix/spawn_int.h
index f683db6217..f134d15b06 100644
--- a/posix/spawn_int.h
+++ b/posix/spawn_int.h
@@ -34,6 +34,7 @@ struct __spawn_action
spawn_do_chdir,
spawn_do_fchdir,
spawn_do_closefrom,
+ spawn_do_tcsetpgrp
} tag;
union
@@ -66,6 +67,10 @@ struct __spawn_action
{
int from;
} closefrom_action;
+ struct
+ {
+ int fd;
+ } setpgrp_action;
} action;
};