|
C-Menu 0.2.9
A User Interface Toolkit
|
Launch executable, detaching from current process. More...
#include <errno.h>#include <fcntl.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/wait.h>#include <unistd.h>Go to the source code of this file.
Functions | |
| int | fork_detach_execvp (char **eargv) |
| Fork, set new session ID, close files, and execute detached command. | |
| int | main (int argc, char *argv[]) |
| strip ANSI SGR sequences | |
| int main | ( | int | argc, |
| char * | argv[] ) |
strip ANSI SGR sequences
| argc | Argument count (should be 2 for the program name and input file) |
| argv | Argument vector (argv[1] should be the input file name) |
This function iterates through the input string, copying characters to the output buffer while skipping over any ANSI escape sequences. It looks for sequences that start with "\033[" and end with "m" or "K", and removes them from the output.
< Buffer to hold the input string read from the file
< Buffer to hold the cleaned output string
Definition at line 63 of file detach.c.
References fork_detach_execvp().