Problem with stdin
Hi,
I've got a problem with adding customized entries to the stdin of a program. The program takes two entries separated by newline (in this case two read() commands from the stdin fd). This assignment is part of a wargame.. but I can't seem to figure it out.
I've been trying to pipe a multiline entry into the program, but it fails due to EOF. I've been trying redirection with the same result. I've also tried dup and dup2 without success..
My last hope was to copy/paste, but it seems like UTF-8 messes with the binary characters. Is there anyone who might be able to help me?
Regards,
Dan
|