public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/17405] New: Implement posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addfchdir_np
@ 2014-09-17 17:39 fweimer at redhat dot com
  2014-09-17 19:18 ` [Bug libc/17405] " carlos at redhat dot com
  2014-12-06  2:52 ` bugdal at aerifal dot cx
  0 siblings, 2 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-09-17 17:39 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17405

            Bug ID: 17405
           Summary: Implement posix_spawn_file_actions_addchdir_np,
                    posix_spawn_file_actions_addfchdir_np
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
                CC: drepper.fsp at gmail dot com

Currently, changing the initial current directory of the child process created
by posix_spawn is only possible with a small helper wrapper which changes the
directory as desired, and then execve's the actual program.  It would be nice
if glibc could provide this functionality directly.

Changing the current directory affects pathname resolution, that's why I think
this should be added as file actions, and not as spawn attributes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/17405] Implement posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addfchdir_np
  2014-09-17 17:39 [Bug libc/17405] New: Implement posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addfchdir_np fweimer at redhat dot com
@ 2014-09-17 19:18 ` carlos at redhat dot com
  2014-12-06  2:52 ` bugdal at aerifal dot cx
  1 sibling, 0 replies; 3+ messages in thread
From: carlos at redhat dot com @ 2014-09-17 19:18 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17405

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
Before we add these to glibc we should consider the fork/exec scability
problem, that way we add these interfaces at the same time as the kernel adds a
new clone flag, and we define the semantics of these functions to be slightly
different than normal posix_spawn.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/17405] Implement posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addfchdir_np
  2014-09-17 17:39 [Bug libc/17405] New: Implement posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addfchdir_np fweimer at redhat dot com
  2014-09-17 19:18 ` [Bug libc/17405] " carlos at redhat dot com
@ 2014-12-06  2:52 ` bugdal at aerifal dot cx
  1 sibling, 0 replies; 3+ messages in thread
From: bugdal at aerifal dot cx @ 2014-12-06  2:52 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=17405

Rich Felker <bugdal at aerifal dot cx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugdal at aerifal dot cx

--- Comment #2 from Rich Felker <bugdal at aerifal dot cx> ---
Carlos, what need do you see for new kernel features? I think userspace
posix_spawn is already perfectly possible without fork (i.e. using CLONE_VM to
avoid the cost of fork), even with file actions and spawnattr features.

I would also like to see support for setsid (needed for implementing terminal
emulators/multiplexers and things like sshd using posix_spawn rather than
fork+exec to run the program on the new pty) and possibly rlimits. The latter
was proposed for inclusion in POSIX but Eric Blake rightfully noted that an
implementation is needed first. I'd like to work out a list of things that
should be added to posix_spawn, get them in glibc (and in musl, where I'm
getting requests for them), and then propose them for standardization.

So far we have:

File actions: chdir/fchdir
Flags: setsid
Other: setrlimit (requires some sort of list of limits to set)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-12-06  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-17 17:39 [Bug libc/17405] New: Implement posix_spawn_file_actions_addchdir_np, posix_spawn_file_actions_addfchdir_np fweimer at redhat dot com
2014-09-17 19:18 ` [Bug libc/17405] " carlos at redhat dot com
2014-12-06  2:52 ` bugdal at aerifal dot cx

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).