...
| Code Block | ||
|---|---|---|
| ||
int fd;
int flags;
char *editor;
if(!(fd = open(file_name, O_CLOEXEC, O_RDONLY))) {
/* Handle Error */
}
/* ... */
editor = getenv("EDITOR");
if (editor == NULL) {
/* Handle getenv() error */
}
system(editor);
|
...