From 6289d28d3c4e56f34830cfb011c31271ef850418 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 27 Jan 2022 10:11:30 -0300 Subject: 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 Tested-by: Carlos O'Donell --- posix/spawn_int.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'posix/spawn_int.h') diff --git a/posix/spawn_int.h b/posix/spawn_int.h index f683db6..f134d15 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; }; -- cgit v1.1