Skip to content

Commit

Permalink
fix description of system_safe in ideas/execs.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rd235 committed Aug 12, 2024
1 parent cb3dcb4 commit 7059e27
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ideas/execs.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ why

how
----
the syntax is crear and follows the standard scheme of naming for `exec*` functions:
the syntax is clear and follows the standard naming scheme of `exec*` functions:
```C
int execs(const char *path, const char *args);
int execse(const char *path, const char *args, char *const envp[]);
Expand All @@ -35,8 +35,11 @@ slash (`\`) is the escape character to protect the next char.
* `execs*` functions do not use dynamic allocation (allocate memory on the stack)
* `execs*` functions are thread safe
* the library provides also eexecs functions (using less memory, but modifying args)
* for lazy programmers, the library includes drop-in replacements for `system(3)` and `popen(3)`
* for lazy programmers, the library includes replacements for `system(3)` and `popen(3)`
(named `system_nosh` and `popen_nosh` respectively) using execs instead of starting a shell.
* `system_safe` is a safe version of `system(3)`. It solves the security problems
of `system`: attacks using environment variables (e.g. PATH), command separators (like
`;` `||` `&&`) or redirections.
where
----
Expand Down

0 comments on commit 7059e27

Please sign in to comment.