@@ -452,6 +452,26 @@ s! {
452
452
pub mnt_passno: :: c_int,
453
453
}
454
454
455
+ pub struct posix_spawn_file_actions_t {
456
+ __allocated: :: c_int,
457
+ __used: :: c_int,
458
+ __actions: * mut :: c_int,
459
+ __pad: [ :: c_int; 16 ] ,
460
+ }
461
+
462
+ pub struct posix_spawnattr_t {
463
+ __flags: :: c_short,
464
+ __pgrp: :: pid_t,
465
+ __sd: :: sigset_t,
466
+ __ss: :: sigset_t,
467
+ #[ cfg( any( target_env = "musl" , target_env = "ohos" ) ) ]
468
+ __prio: :: c_int,
469
+ #[ cfg( not( any( target_env = "musl" , target_env = "ohos" ) ) ) ]
470
+ __sp: :: sched_param,
471
+ __policy: :: c_int,
472
+ __pad: [ :: c_int; 16 ] ,
473
+ }
474
+
455
475
pub struct genlmsghdr {
456
476
pub cmd: u8 ,
457
477
pub version: u8 ,
@@ -1839,6 +1859,8 @@ pub const POSIX_MADV_NORMAL: ::c_int = 0;
1839
1859
pub const POSIX_MADV_RANDOM : :: c_int = 1 ;
1840
1860
pub const POSIX_MADV_SEQUENTIAL : :: c_int = 2 ;
1841
1861
pub const POSIX_MADV_WILLNEED : :: c_int = 3 ;
1862
+ pub const POSIX_SPAWN_USEVFORK : :: c_int = 64 ;
1863
+ pub const POSIX_SPAWN_SETSID : :: c_int = 128 ;
1842
1864
1843
1865
pub const S_IEXEC : mode_t = 64 ;
1844
1866
pub const S_IWRITE : mode_t = 128 ;
@@ -2596,6 +2618,13 @@ pub const ETH_P_PHONET: ::c_int = 0x00F5;
2596
2618
pub const ETH_P_IEEE802154 : :: c_int = 0x00F6 ;
2597
2619
pub const ETH_P_CAIF : :: c_int = 0x00F7 ;
2598
2620
2621
+ pub const POSIX_SPAWN_RESETIDS : :: c_int = 0x01 ;
2622
+ pub const POSIX_SPAWN_SETPGROUP : :: c_int = 0x02 ;
2623
+ pub const POSIX_SPAWN_SETSIGDEF : :: c_int = 0x04 ;
2624
+ pub const POSIX_SPAWN_SETSIGMASK : :: c_int = 0x08 ;
2625
+ pub const POSIX_SPAWN_SETSCHEDPARAM : :: c_int = 0x10 ;
2626
+ pub const POSIX_SPAWN_SETSCHEDULER : :: c_int = 0x20 ;
2627
+
2599
2628
pub const NLMSG_NOOP : :: c_int = 0x1 ;
2600
2629
pub const NLMSG_ERROR : :: c_int = 0x2 ;
2601
2630
pub const NLMSG_DONE : :: c_int = 0x3 ;
@@ -5425,6 +5454,82 @@ extern "C" {
5425
5454
pub fn endmntent ( streamp : * mut :: FILE ) -> :: c_int ;
5426
5455
pub fn hasmntopt ( mnt : * const :: mntent , opt : * const :: c_char ) -> * mut :: c_char ;
5427
5456
5457
+ pub fn posix_spawn (
5458
+ pid : * mut :: pid_t ,
5459
+ path : * const :: c_char ,
5460
+ file_actions : * const :: posix_spawn_file_actions_t ,
5461
+ attrp : * const :: posix_spawnattr_t ,
5462
+ argv : * const * mut :: c_char ,
5463
+ envp : * const * mut :: c_char ,
5464
+ ) -> :: c_int ;
5465
+ pub fn posix_spawnp (
5466
+ pid : * mut :: pid_t ,
5467
+ file : * const :: c_char ,
5468
+ file_actions : * const :: posix_spawn_file_actions_t ,
5469
+ attrp : * const :: posix_spawnattr_t ,
5470
+ argv : * const * mut :: c_char ,
5471
+ envp : * const * mut :: c_char ,
5472
+ ) -> :: c_int ;
5473
+ pub fn posix_spawnattr_init ( attr : * mut posix_spawnattr_t ) -> :: c_int ;
5474
+ pub fn posix_spawnattr_destroy ( attr : * mut posix_spawnattr_t ) -> :: c_int ;
5475
+ pub fn posix_spawnattr_getsigdefault (
5476
+ attr : * const posix_spawnattr_t ,
5477
+ default : * mut :: sigset_t ,
5478
+ ) -> :: c_int ;
5479
+ pub fn posix_spawnattr_setsigdefault (
5480
+ attr : * mut posix_spawnattr_t ,
5481
+ default : * const :: sigset_t ,
5482
+ ) -> :: c_int ;
5483
+ pub fn posix_spawnattr_getsigmask (
5484
+ attr : * const posix_spawnattr_t ,
5485
+ default : * mut :: sigset_t ,
5486
+ ) -> :: c_int ;
5487
+ pub fn posix_spawnattr_setsigmask (
5488
+ attr : * mut posix_spawnattr_t ,
5489
+ default : * const :: sigset_t ,
5490
+ ) -> :: c_int ;
5491
+ pub fn posix_spawnattr_getflags (
5492
+ attr : * const posix_spawnattr_t ,
5493
+ flags : * mut :: c_short ,
5494
+ ) -> :: c_int ;
5495
+ pub fn posix_spawnattr_setflags ( attr : * mut posix_spawnattr_t , flags : :: c_short ) -> :: c_int ;
5496
+ pub fn posix_spawnattr_getpgroup (
5497
+ attr : * const posix_spawnattr_t ,
5498
+ flags : * mut :: pid_t ,
5499
+ ) -> :: c_int ;
5500
+ pub fn posix_spawnattr_setpgroup ( attr : * mut posix_spawnattr_t , flags : :: pid_t ) -> :: c_int ;
5501
+ pub fn posix_spawnattr_getschedpolicy (
5502
+ attr : * const posix_spawnattr_t ,
5503
+ flags : * mut :: c_int ,
5504
+ ) -> :: c_int ;
5505
+ pub fn posix_spawnattr_setschedpolicy ( attr : * mut posix_spawnattr_t , flags : :: c_int ) -> :: c_int ;
5506
+ pub fn posix_spawnattr_getschedparam (
5507
+ attr : * const posix_spawnattr_t ,
5508
+ param : * mut :: sched_param ,
5509
+ ) -> :: c_int ;
5510
+ pub fn posix_spawnattr_setschedparam (
5511
+ attr : * mut posix_spawnattr_t ,
5512
+ param : * const :: sched_param ,
5513
+ ) -> :: c_int ;
5514
+
5515
+ pub fn posix_spawn_file_actions_init ( actions : * mut posix_spawn_file_actions_t ) -> :: c_int ;
5516
+ pub fn posix_spawn_file_actions_destroy ( actions : * mut posix_spawn_file_actions_t ) -> :: c_int ;
5517
+ pub fn posix_spawn_file_actions_addopen (
5518
+ actions : * mut posix_spawn_file_actions_t ,
5519
+ fd : :: c_int ,
5520
+ path : * const :: c_char ,
5521
+ oflag : :: c_int ,
5522
+ mode : :: mode_t ,
5523
+ ) -> :: c_int ;
5524
+ pub fn posix_spawn_file_actions_addclose (
5525
+ actions : * mut posix_spawn_file_actions_t ,
5526
+ fd : :: c_int ,
5527
+ ) -> :: c_int ;
5528
+ pub fn posix_spawn_file_actions_adddup2 (
5529
+ actions : * mut posix_spawn_file_actions_t ,
5530
+ fd : :: c_int ,
5531
+ newfd : :: c_int ,
5532
+ ) -> :: c_int ;
5428
5533
pub fn fread_unlocked (
5429
5534
buf : * mut :: c_void ,
5430
5535
size : :: size_t ,
0 commit comments