Euphoria Ticket #700: Pipeio.e: process[PID] is off-by-one on Linux.

Pipeio.e: process[PID] is off-by-one (-1) on Linux. kill() does not work because of this.

Details

Type: Bug Report Severity: Major Category: Library Routine
Assigned To: robcraig Status: Invalid Reported Release: 4.0.3
Fixed in SVN #: View VCS: none Milestone:

1. Comment by mattlewis Aug 11, 2011

I'm not seeing this, exactly. Can you supply code to demonstrate? To test, I added the following to t_pipeio.e (line 32):

printf(1, "process pid: %d\n", p[PID])  
system("ps -ef | grep eui") 

Reviewing the output, I get:

process pid: 2419 
matt      2416  2099  0 16:05 pts/0    00:00:00 ../4.0/eui t_pipeio.e 
matt      2419  2416  0 16:05 pts/0    00:00:00 /bin/sh -c ../4.0/eui ../demo/pipe_sub.ex 
matt      2422  2416  0 16:05 pts/0    00:00:00 sh -c ps -ef | grep eui 
matt      2426  2422  0 16:05 pts/0    00:00:00 grep eui 
matt      2427  2419  0 16:05 pts/0    00:00:00 ../4.0/eui ../demo/pipe_sub.ex 

It looks like we're getting the PID of the shell that's being used to execute the actual command. I suppose this is because we're executing like this:

    exec_args("/bin/sh",{"-c", cmd}, pipe) 

I'm guessing we do this so that we don't have to separate the command from the arguments of whatever the user actually wants to run?

2. Comment by jimcbrown Sep 13, 2012

No response in over a year. I'm calling this one invalid.

Search



Quick Links

User menu

Not signed in.

Misc Menu