Fork and exec

Hi,

I ran the program below.

system "mkfifo ttt"
pid = fork
exec (“cat < ttt”) if pid.nil?
sleep 30

and I did a ps |grep cat
below is the sample

ted 24299 24298 0 19:15:20 pts/30 0:00 sh -c cat < ttt
ted 24298 24297 0 19:15:20 pts/30 0:00 sh -c cat < ttt

I would expect only one process the real “cat process”, but apparently, ruby
spawned
a process and then a child process, which is the real one.

Any idea?

Thanks

-Ted