'cat' command fails in some cases - QNX 6.1

cat my_file.txt /dev/zero | head -1

If this command is executed from a remote machine (say from a telnet session), ‘cat’ command prints first line and waits indefinitely (no matter who you login as). This behaviour is true even if the above command is executed on the QNX host PC with a login other than ‘root’.

Am I doing anything wrong?

I have a requirement where in I need to pad with null to make a block out of it. As this was impossible to achieve, I tried compiling GNU source for ‘cat’ and found everything working.

cat_gnu my_file.txt /dev/zero | head -1
succeeds.

I can’t reproduce the problem on QNX 6.2. Guess they’ve fixed it. If you have to use QNX 6.1 for whatever reasons, you will need to use gnu cat or possible copy the “cat” from a QNX 6.2 machine.