Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162636530
D56222.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
D56222.diff
View Options
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -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
diff --git a/include/spawn.h b/include/spawn.h
--- a/include/spawn.h
+++ b/include/spawn.h
@@ -85,6 +85,10 @@
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 *
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -468,8 +468,8 @@
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 \
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -475,6 +475,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;
diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3
--- a/lib/libc/gen/posix_spawn.3
+++ b/lib/libc/gen/posix_spawn.3
@@ -446,11 +446,11 @@
.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 ,
diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c
--- a/lib/libc/gen/posix_spawn.c
+++ b/lib/libc/gen/posix_spawn.c
@@ -549,6 +549,8 @@
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 @@
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)
diff --git a/lib/libc/gen/posix_spawn_file_actions_addopen.3 b/lib/libc/gen/posix_spawn_file_actions_addopen.3
--- a/lib/libc/gen/posix_spawn_file_actions_addopen.3
+++ b/lib/libc/gen/posix_spawn_file_actions_addopen.3
@@ -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 @@
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 @@
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 @@
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 @@
.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 ed@FreeBSD.org
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 16, 7:15 AM (13 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35128978
Default Alt Text
D56222.diff (6 KB)
Attached To
Mode
D56222: Update posix_spawn for POSIX 2024
Attached
Detach File
Event Timeline
Log In to Comment