Well, you didn't say what OS you were running, but if it's a
relatively-normal version of Unix/Linux, then errno 4 is EINTR
("interrupted system call"), and according to the open() man page, you
only get that if the process received a signal during the open().
Perhaps you sent a signal to the "named" process at a