c - Why is my input delayed when sent to process via pipes? -
i'm writing program operating systems project meant modem keyboard in type key , outputs fsk-modulated-audio-signal corresponding ascii value of key. how i've set program forks process , execs program called minimodem ( see here info). parent set non canonical input mode , gets user input character @ time. each character sent child via pipe. i'll paste code now: #include <stdlib.h> #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <stdio.h> #include <sys/ioctl.h> #include <string.h> #include <termios.h> extern char* program_invocation_short_name; static struct termios old, new; void init_termios(int echo); void reset_termios(void); int main(int argc, char* argv[]) { pid_t pid; int my_pipe[2]; char* baud = "300"; if (argc == 2) { if(atoi(argv[1]) == 0) { printf("use: %s [baud]\n",program_invocation_short_name); return exit_success; } baud = argv[1]; } i...