Commit Graph

7 Commits

Author SHA1 Message Date
Simon Ruderich
f54cd101d7 Update copyright year. 2014-01-01 16:41:01 +01:00
Simon Ruderich
2c55827f6f tests/example_exec.c: Sort environment variables. 2013-07-01 02:35:11 +02:00
Simon Ruderich
219a9882ba tests: Check return values of write() and dup2(). 2013-06-21 23:03:12 +02:00
Simon Ruderich
0d7f306898 Overwrite tracked file descriptors when exporting COLORED_STDERR_FDS.
If the list of tracked file descriptors is modified to contain unwanted
values (e.g. when a parent process closes or redirects stderr), this
makes it possible to set the tracked file descriptors back to a given
list.

This problem occurred with startx which somehow closes or redirects
stderr. As COLORED_STDERR_FDS was set in the shell running startx, this
disabled coloring stderr for all processes started in the X11 session.

This is no longer an issue. As COLORED_STDERR_FDS is set in the shell
configuration file, it automatically sets the list to the correct value
when a shell is opened in the terminal emulator once X11 is running.
2013-06-21 23:03:12 +02:00
Simon Ruderich
237251ae9c Hook execvpe(), a GNU extension. 2013-06-10 17:10:44 +02:00
Simon Ruderich
afca2864dc tests: Fix warnings about unused parameters. 2013-06-10 15:22:17 +02:00
Simon Ruderich
7ea72c40db Hook execve() and the other exec*() functions.
Prevents programs from removing our environment variables during the
exec.

Also reduces unnecessary calls to update_environment() by calling it
only once before the exec.
2013-06-05 01:40:56 +02:00