From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 106263858C3A; Mon, 10 Jan 2022 14:54:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 106263858C3A From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/28730] Extend posix_spawnattr_* interface with more useful features Date: Mon, 10 Jan 2022 14:54:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jan 2022 14:54:43 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28730 --- Comment #6 from Adhemerval Zanella --- (In reply to Cristian Rodr=C3=ADguez from comment #5) > So the best way way would be to use the pad space to introduce a an inter= nal > opaque struct which we can modify or extend at will ? even with all > implementation-defined leisure we still shouldn't break the ABI.. Yes, although I would first use the current space available and keep space = for a pointer to allow extend the functionaly. Something like: typedef struct { short int __flags; pid_t __pgrp; sigset_t __sd; sigset_t __ss; struct sched_param __sp; int __policy; /* Add newer fields here. */ int __pad[N]; void *__reserved/ } posix_spawnattr_t; So for posix_spawnattr_setpdeathsig_np it would be something like: typedef struct { short int __flags; pid_t __pgrp; sigset_t __sd; sigset_t __ss; struct sched_param __sp; int __policy; int __deathsignal; int __pad[M]; } posix_spawnattr_t; With M adjusted to keep the current size. For posix_spawnattr_setrlimit_np I would do: typedef struct { short int __flags; pid_t __pgrp; sigset_t __sd; sigset_t __ss; struct sched_param __sp; int __policy; int __deathsignal; void *__resource; int __pad[M]; } posix_spawnattr_t; And internally '__resource' will be array of: struct posix_spawn_resource { int resource; struct rlimit64 rlim; } (The rlimit has the LFS issue, so I think it shold be supported only for LFS mode). --=20 You are receiving this mail because: You are on the CC list for the bug.=