Skip to content

Commit

Permalink
picture no way!
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Apr 21, 2024
1 parent 0937d67 commit 4d7fbd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Binary file added gdmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 8 additions & 3 deletions src/gdmp.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#define _POSIX_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
Expand All @@ -25,7 +26,7 @@ void sig_handler(int sig) {
ioctl(STDIN_FILENO, TIOCGWINSZ, (char *) &size);
ioctl(fd, TIOCSWINSZ, (char *) &size);
}
else kill(child_pid, sig);
//else kill(child_pid, sig);
}
if (signal.mode == 2) write(fd, signal.text, strlen(signal.text));
else if (signal.mode == 3) {
Expand All @@ -43,8 +44,12 @@ void io_handler(int pty) {
// SIGWINCH needs to be registered by default for resizing to work
trap(SIGWINCH, sig_handler);

for (int i = 0; i < 32; i++)
if (signals[i].sig) trap(signals[i].sig, sig_handler);
for (int i = 0; i < 32; i++) {
if (signals[i].sig) {
printf("PAIN: %d", signals[i].sig);
trap(signals[i].sig, sig_handler);
}
}

for (;;) {
n = read(STDIN_FILENO, buf, sizeof(buf));
Expand Down

0 comments on commit 4d7fbd3

Please sign in to comment.