]> sourceware.org Git - systemtap.git/commit
Use posix_spawn_file_actions for stap_system_read
authorJosh Stone <jistone@redhat.com>
Fri, 11 Feb 2011 00:43:55 +0000 (16:43 -0800)
committerJosh Stone <jistone@redhat.com>
Fri, 11 Feb 2011 00:43:55 +0000 (16:43 -0800)
commitb63fab8739c5c6d6a83c5225682fb64cebd7b208
tree46a28a1c58eb12332144c54850d5e514a1ed3f4a
parent1544bdf963f6c48826774a6031306518342558cc
Use posix_spawn_file_actions for stap_system_read

The file actions can handle the dup2 necessary to hook a pipe onto the
child's stdout.  It could do the necessary closing too, but we'll just
use FD_CLOEXEC for that.

* util.cxx (stap_spawn): Take file_actions for the posix_spawn.
  (pipe_child_fd): New, open a pipe and set the dup2 action for it.
  (stap_system_read): Let stap_spawn and pipe_child_fd do the hard part.
util.cxx
This page took 0.024793 seconds and 5 git commands to generate.