mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
posix_spawn: actions chdir and fchdir are now required by POSIX
Drop the _np suffix. Reviewed by: dim Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D56222
This commit is contained in:
1 parent
4b862c713a
commit
7caa71145c
7 files changed
+36
-16
No files matched your search
@@ -51,6 +51,10 @@
|
||||
# xargs -n1 | sort | uniq -d;
|
||||
# done
|
||||
|
||||
# 20260402: posix_spawn_file_actions_addchdir lost _np suffix
|
||||
OLD_FILES+=usr/share/man/man3/posix_spawn_file_actions_addchdir_np.3.gz
|
||||
OLD_FILES+=usr/share/man/man3/posix_spawn_file_actions_addfchdir_np.3.gz
|
||||
|
||||
# 20260324: test file renamed
|
||||
OLD_FILES+=usr/tests/sys/netinet/tcp_implied_connect
|
||||
|
||||
|
||||
@@ -85,6 +85,10 @@ int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t * __restrict,
|
||||
int, const char * __restrict, int, mode_t);
|
||||
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int);
|
||||
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int);
|
||||
int posix_spawn_file_actions_addchdir(posix_spawn_file_actions_t *
|
||||
__restrict, const char * __restrict);
|
||||
int posix_spawn_file_actions_addfchdir(posix_spawn_file_actions_t *,
|
||||
int);
|
||||
|
||||
#if __BSD_VISIBLE
|
||||
int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *
|
||||
|
||||
@@ -468,8 +468,8 @@ MLINKS+=posix_spawn.3 posix_spawnp.3 \
|
||||
posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclose.3 \
|
||||
posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addclosefrom_np.3 \
|
||||
posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_adddup2.3 \
|
||||
posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir_np.3 \
|
||||
posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir_np.3 \
|
||||
posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addchdir.3 \
|
||||
posix_spawn_file_actions_addopen.3 posix_spawn_file_actions_addfchdir.3 \
|
||||
posix_spawn_file_actions_init.3 posix_spawn_file_actions_destroy.3 \
|
||||
posix_spawnattr_getflags.3 posix_spawnattr_setflags.3 \
|
||||
posix_spawnattr_getexecfd_np.3 posix_spawnattr_setexecfd_np.3 \
|
||||
|
||||
@@ -475,6 +475,8 @@ FBSD_1.8 {
|
||||
};
|
||||
|
||||
FBSD_1.9 {
|
||||
posix_spawn_file_actions_addchdir;
|
||||
posix_spawn_file_actions_addfchdir;
|
||||
posix_spawnattr_getexecfd_np;
|
||||
posix_spawnattr_getprocdescp_np;
|
||||
posix_spawnattr_setexecfd_np;
|
||||
|
||||
@@ -446,11 +446,11 @@ action.
|
||||
.Xr sched_setscheduler 2 ,
|
||||
.Xr setpgid 2 ,
|
||||
.Xr vfork 2 ,
|
||||
.Xr posix_spawn_file_actions_addchdir_np 3 ,
|
||||
.Xr posix_spawn_file_actions_addchdir 3 ,
|
||||
.Xr posix_spawn_file_actions_addclose 3 ,
|
||||
.Xr posix_spawn_file_actions_addclosefrom_np 3 ,
|
||||
.Xr posix_spawn_file_actions_adddup2 3 ,
|
||||
.Xr posix_spawn_file_actions_addfchdir_np 3 ,
|
||||
.Xr posix_spawn_file_actions_addfchdir 3 ,
|
||||
.Xr posix_spawn_file_actions_addopen 3 ,
|
||||
.Xr posix_spawn_file_actions_destroy 3 ,
|
||||
.Xr posix_spawn_file_actions_init 3 ,
|
||||
|
||||
@@ -549,6 +549,8 @@ posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *
|
||||
STAILQ_INSERT_TAIL(&(*fa)->fa_list, fae, fae_list);
|
||||
return (0);
|
||||
}
|
||||
__weak_reference(posix_spawn_file_actions_addchdir_np,
|
||||
posix_spawn_file_actions_addchdir);
|
||||
|
||||
int
|
||||
posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *__restrict fa,
|
||||
@@ -571,6 +573,9 @@ posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *__restrict fa,
|
||||
return (0);
|
||||
}
|
||||
|
||||
__weak_reference(posix_spawn_file_actions_addfchdir_np,
|
||||
posix_spawn_file_actions_addfchdir);
|
||||
|
||||
int
|
||||
posix_spawn_file_actions_addclosefrom_np (posix_spawn_file_actions_t *
|
||||
__restrict fa, int from)
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
.Nm posix_spawn_file_actions_adddup2 ,
|
||||
.Nm posix_spawn_file_actions_addclose ,
|
||||
.Nm posix_spawn_file_actions_addclosefrom_np ,
|
||||
.Nm posix_spawn_file_actions_addchdir_np ,
|
||||
.Nm posix_spawn_file_actions_addfchdir_np
|
||||
.Nm posix_spawn_file_actions_addchdir ,
|
||||
.Nm posix_spawn_file_actions_addfchdir
|
||||
.Nd "add open, dup2, close, closefrom, or chdir/fchdir actions to spawn file actions object"
|
||||
.Sh LIBRARY
|
||||
.Lb libc
|
||||
@@ -72,12 +72,12 @@
|
||||
.Fa "int from"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo posix_spawn_file_actions_addchdir_np
|
||||
.Fo posix_spawn_file_actions_addchdir
|
||||
.Fa "posix_spawn_file_actions_t *restrict file_actions"
|
||||
.Fa "const char *restrict path"
|
||||
.Fc
|
||||
.Ft int
|
||||
.Fo posix_spawn_file_actions_addfchdir_np
|
||||
.Fo posix_spawn_file_actions_addfchdir
|
||||
.Fa "posix_spawn_file_actions_t * file_actions"
|
||||
.Fa "int fildes"
|
||||
.Fc
|
||||
@@ -189,9 +189,9 @@ For each open file descriptor, logically the close action is performed,
|
||||
and any possible errors encountered are ignored.
|
||||
.Pp
|
||||
The
|
||||
.Fn posix_spawn_file_actions_addchdir_np
|
||||
.Fn posix_spawn_file_actions_addchdir
|
||||
and
|
||||
.Fn posix_spawn_file_actions_addfchdir_np
|
||||
.Fn posix_spawn_file_actions_addfchdir
|
||||
functions add a change current directory action to the object
|
||||
referenced by
|
||||
.Fa file_actions
|
||||
@@ -201,11 +201,11 @@ in the order of insertion into the
|
||||
object.
|
||||
It also sets the working directory for the spawned program.
|
||||
The
|
||||
.Fn posix_spawn_file_actions_addchdir_np
|
||||
.Fn posix_spawn_file_actions_addchdir
|
||||
function takes the
|
||||
.Fa path
|
||||
to set as the working directory, while
|
||||
.Fn posix_spawn_file_actions_addfchdir_np
|
||||
.Fn posix_spawn_file_actions_addfchdir
|
||||
takes the directory file descriptor.
|
||||
.Sh RETURN VALUES
|
||||
Upon successful completion, these functions return zero;
|
||||
@@ -250,11 +250,8 @@ is equal to
|
||||
A future update of the Standard is expected to require this behavior.
|
||||
.Pp
|
||||
The
|
||||
.Fn posix_spawn_file_actions_addchdir_np ,
|
||||
.Fn posix_spawn_file_actions_addfchdir_np ,
|
||||
and
|
||||
.Fn posix_spawn_file_actions_addclosefrom_np
|
||||
functions are non-standard functions implemented after the similar
|
||||
function is non-standard and implemented after the similar
|
||||
functionality provided by glibc.
|
||||
.Sh HISTORY
|
||||
The
|
||||
@@ -271,5 +268,13 @@ and
|
||||
.Fn posix_spawn_file_actions_addclosefrom_np
|
||||
functions first appeared in
|
||||
.Fx 13.1 .
|
||||
In
|
||||
.Fx 16.0 ,
|
||||
the
|
||||
.Fn posix_spawn_file_actions_addchdir ,
|
||||
.Fn posix_spawn_file_actions_addfchdir
|
||||
aliases where added to the corresponding functions with the
|
||||
.Ql _np
|
||||
suffix.
|
||||
.Sh AUTHORS
|
||||
.An \&Ed Schouten Aq Mt [email protected]
|
||||
Reference in new issue
Block a user