Stephen Heumann
0d0ec552b5
Properly support running programs using relative pathnames.
...
Previously, relative pathnames other than those starting with "." or ".." wouldn't be recognized.
2015-02-03 21:24:10 -06:00
Stephen Heumann
3380dae27a
If hush is invoked as a login shell, set up a handler so it will be invoked when system() is called.
2015-01-01 17:33:01 -06:00
Stephen Heumann
787a84b7e8
Include copyright/license notices in all c files, including a BSD-style license for ones written from scratch by me.
2014-12-15 17:27:46 -06:00
Stephen Heumann
d0dd867542
Fix problem where trying to run a program on a nonexistent volume gave an unescapable 'insert disk' dialog.
...
This also gives more sensible error messages when trying to execute nonexistent files.
2014-12-14 22:37:12 -06:00
Stephen Heumann
ac0aab62bf
Eliminate memory leaks in the exec* routines for GNO.
...
This is done by adding new memory allocation routines that use the current process's userID, so the memory will be deallocated when it quits or execs, even if it's a forked child process.
2014-12-09 18:11:20 -06:00
Stephen Heumann
b4a362ef71
Make test report EXEC files (shell scripts) as executable.
2014-12-04 13:41:21 -06:00
Stephen Heumann
fb9b298ca4
Implement "close-on-exec" functionality for GNO.
...
We do this by maintaining a mask (for each pid) giving the fds to be closed on exec. We wrap functions that close fds so that their close-on-exec bits can be cleared at that point.
This implementation may close the fds even if the execve operation ultimately fails.
2014-12-03 21:04:46 -06:00
Stephen Heumann
7ceb59ae57
Minor cleanup in execve.
2014-11-22 22:57:59 -06:00
Stephen Heumann
036cea4dbe
Add support to our execve for running scripts, which may have a #! line giving the interpreter to use.
...
We have to do this ourselves, since the GNO kernel's _execve doesn't do it for us.
2014-11-22 21:27:11 -06:00
Stephen Heumann
3e7c0d0ace
Add our own version of execve for GNO, which can quote arguments and can remove variables from the environment if needed.
...
Our versions of the execv* functions have been moved to their own file. They are now used for all the exec* calls in hush.
2014-11-22 16:53:59 -06:00