Fix externalpipein patch (#78)
* fix externalpipein patch don't close the slave fd, according to the original patch in https://lists.suckless.org/hackers/2004/17218.html * externalpipein patch: add example command press S-C-M to set the terminal background green dynamically. Replace `printf ...` with `dynamic-colors cycle` command mentioned in https://lists.suckless.org/hackers/2004/17218.html to cycle though the available dynamic color themes.
This commit is contained in:
parent
bcfa5b9b7f
commit
427895a7c2
2 changed files with 12 additions and 2 deletions
5
st.c
5
st.c
|
|
@ -1090,15 +1090,16 @@ ttynew(const char *line, char *cmd, const char *out, char **args)
|
|||
#endif // RIGHTCLICKTOPLUMB_PATCH
|
||||
die("pledge\n");
|
||||
#endif
|
||||
close(s);
|
||||
cmdfd = m;
|
||||
#if EXTERNALPIPEIN_PATCH && EXTERNALPIPE_PATCH
|
||||
csdfd = s;
|
||||
cmdfd = m;
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_handler = sigchld;
|
||||
sigaction(SIGCHLD, &sa, NULL);
|
||||
#else
|
||||
close(s);
|
||||
cmdfd = m;
|
||||
signal(SIGCHLD, sigchld);
|
||||
#endif // EXTERNALPIPEIN_PATCH
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue