Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed May 4, 2024
1 parent 4933bb5 commit 311a267
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/gdmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,16 @@ static void sig_handler(int sig) {
ioctl(STDIN_FILENO, TIOCGWINSZ, (char *) &size);
ioctl(fd, TIOCSWINSZ, (char *) &size);
}
else kill(child_pid, sig);

// TODO: Make signal forwarding actually work
else {
#ifdef TIOCSIGNAL
ioctl(fd, TIOCSIGNAL, sig);
#endif
#ifdef TIOCSIG
ioctl(fd, TIOCSIG, sig);
#endif
}
}
if (signal.mode == 2) {
write(fd, signal.text, strlen(signal.text));
Expand Down Expand Up @@ -89,11 +98,6 @@ int main(int argc, char *argv[]) {

if (child_pid < 0) err("Failed to create child process.");
if (child_pid == 0) {

/*sigset_t mask;
sigfillset(&mask);
sigprocmask(SIG_BLOCK, &mask, NULL);*/

execvp(argv[cmd_offset], argv + cmd_offset);
err("Failed to run command.");
}
Expand Down

0 comments on commit 311a267

Please sign in to comment.