[PATCH] posix: Replace posix_spawnattr_tc{get,set}pgrp_np with posix_spawn_file_actions_addtcsetpgrp_np

Florian Weimer fweimer@redhat.com
Thu Jan 27 16:11:54 GMT 2022


* Adhemerval Zanella:

> 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.

This has an ABI check failure on Hurd:

--- ../sysdeps/mach/hurd/i386/libc.abilist      2022-01-27 10:04:20.120812828 -0500
+++ /home/bmg/build/glibcs/i686-gnu/glibc/libc.symlist  2022-01-27 10:43:39.646804376 -0500
@@ -2292,2 +2291,0 @@ GLIBC_2.35 posix_spawn_file_actions_addt
-GLIBC_2.35 posix_spawnattr_tcgetpgrp_np F
-GLIBC_2.35 posix_spawnattr_tcsetpgrp_np F

The changes look okay to me.  A second review is probably warranted at
this stage.

Thanks,
Florian



More information about the Libc-alpha mailing list