linux OS call, unable to get any working function for command having a pipe. Dummy ex. : `/usr/bin/md5sum /etc/hosts | cut -f1 -d' '`

69 views
Skip to first unread message

Gachoud Philippe

unread,
Dec 2, 2019, 11:38:01 AM12/2/19
to Eiffel Users
Hi all,

Since months now I'm working around shell commands which are really handy and more efficient to have some things done at the OS level than with eiffel. In this particular case I'd like to get the md5sum of the uncompressed version of a bz2 file. And having a ton of them, I dont want to decompress it before md5_ing it and then compress it back.

I want to call something like

command_result ("/usr/bin/md5sum /etc/hosts | cut -f1 -d' '")

The way I tried are

feature -- Commands

command_result (a_command: STRING): PROCESS_COMMAND_RESULT
-- Not working in case of grep
local
l_process: PROCESS_MISC
l_retry_count: INTEGER
do
create l_process
check
command_result_attached: attached l_process.output_of_command (a_command, Void) as l_proc_res
then
Result := l_proc_res
-- check
-- Result.exit_code = 0
-- -- 127 command not found
-- end
end
ensure
instance_free: Class
rescue
if l_retry_count < 3 then
l_retry_count := l_retry_count + 1
retry
else
{SIT_UTIL}.write_error ("command_result error, even after retrying 3 times :" + a_command)
end
end


command_result_3 (a_cmd: READABLE_STRING_GENERAL): detachable PROCESS_COMMAND_RESULT
-- From $Eiffel_19.10/contrib/library/svn/implementation/process_misc.e
local
pf: BASE_PROCESS_FACTORY
p: BASE_PROCESS
retried: BOOLEAN
dn: detachable READABLE_STRING_32
err,res: STRING
err_spec, res_spec: SPECIAL [NATURAL_8]
do
if not retried then
create res.make (0)
create err.make (0)
create pf
-- if a_dir /= Void then
-- dn := a_dir.name
-- end
p := pf.process_launcher_with_command_line (a_cmd, dn)
p.set_hidden (True)
p.set_separate_console (False)
p.redirect_output_to_stream
p.redirect_error_to_stream

create res_spec.make_filled (0, 1024)
create err_spec.make_filled (0, 1024)

p.launch
if p.launched then
from
until
p.has_output_stream_closed or p.has_output_stream_error
loop
p.read_output_to_special (res_spec)
append_special_of_natural_8_to_string_8 (res_spec, res)
end

from
until
p.has_error_stream_closed or p.has_error_stream_error
loop
p.read_error_to_special (err_spec)
append_special_of_natural_8_to_string_8 (err_spec, err)
end

p.wait_for_exit
create Result.make (p.exit_code, res, err)
else
check
not_launched: False
end
end
else
check
retried: False
end
end
ensure
instance_free: Class
rescue
retried := True
retry
end

command_result_2 (a_command: STRING): PROCESS_COMMAND_RESULT
local
l_base_proc: BASE_PROCESS
l_buffer: SPECIAL [NATURAL_8]
l_error: STRING
do
create l_buffer.make_empty (2048)
l_base_proc := {BASE_PROCESS_FACTORY}.process_launcher_with_command_line (a_command, Void)
l_base_proc.redirect_output_to_stream
l_base_proc.redirect_error_to_stream
l_base_proc.launch
-- l_process.launch
l_base_proc.wait_for_exit
l_error := ""

if l_base_proc.exit_code = 0 and not l_base_proc.has_output_stream_error then
do_nothing
else
{SIT_UTIL}.write_error ("Error on command " + a_command + " Details:" + "None")
check
not_happening: False
end
end
create Result.make (l_base_proc.exit_code, l_buffer.to_array.out, l_error)
ensure
instance_free: class
end



If anybody has a working solution with pipes it would really be greatly appreciated!

Thx

Jocelyn Fiat

unread,
Dec 2, 2019, 11:59:53 AM12/2/19
to Eiffel Users
This may not be the answer you expect, but quite often I tend to use a simple solution using an extra script.
So I don't have to write the complex redirection, pipe, ... I just call a simple script.

This is also nice for portability, as sometimes the executable is not always at the same location, or even sometimes, depending on the platform, some executable has various usage (this is rare, but it happens).
But it adds deployment requirement and application layout management.
(at worst, you can always build the script on the fly, in a temporary file).



--
You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/eabe27c1-f64d-4d6b-b44a-d7d73c05a432%40googlegroups.com.


--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

Gachoud Philippe

unread,
Dec 2, 2019, 12:13:47 PM12/2/19
to Eiffel Users
Thx Jocelyn, its a useful workaround, but not something which is what I want... in that case, I'll decompress the file, etc.... but its really annoying... and is there a reason for these types of commands not to work!!???

As even you are using workarounds, it seems many are working around something which seems very basic for me, maybe I'm one of the few or only eiffel user using linux with advanced pipes, greps, awks, seds, and mores :-(((
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel...@googlegroups.com.

Alexander Kogtenkov

unread,
Dec 2, 2019, 12:16:33 PM12/2/19
to eiffel...@googlegroups.com
You can use something like that:
 
           command: READABLE_STRING_32
           arguments: ARRAYED_LIST [READABLE_STRING_32]
           directory: READABLE_STRING_32
 
            command := (create {EXECUTION_ENVIRONMENT}).default_shell
            if command.is_empty then
               command := {STRING_32} "sh"
            end
            create arguments.make (1)
            arguments.extend ({STRING_32} "/usr/bin/md5sum /etc/hosts | cut -f1 -d")
            directory := ...
            p := (create {BASE_PROCESS_FACTORY}).process_launcher (command, arguments, directory)
            ...
 
Hope this helps,
Alexander Kogtenkov
 
 
Понедельник, 2 декабря 2019, 19:38 +03:00 от Gachoud Philippe <ph.ga...@gmail.com>:
 
--

You received this message because you are subscribed to the Google Groups "Eiffel Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

Alexander Kogtenkov

unread,
Dec 2, 2019, 12:30:23 PM12/2/19
to eiffel...@googlegroups.com
Everything works without workarounds if the invoked command is the shell processor (sh, bash, etc.) and the argument is the command line you would like to execute. In this case there is no need to break the line into separate arguments, this will be done by the shell itself. I.e., you need to pass "foo -x -y bar | qux -z bar > whatever.out" as a whole, without breaking it into separate strings.
 
On Windows, the things gets only a tiny bit more complicated: the command (unless the default one has been found — see another reply) can be set to "cmd", the first argument should be "/c", and the second — the whole command line as above.
 
Regards,
Alexander Kogtenkov
 
 
Понедельник, 2 декабря 2019, 20:13 +03:00 от Gachoud Philippe <ph.ga...@gmail.com>:
 
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eiffel-users/9c8feb38-a27e-4994-8df1-eb9e08b4c2ae%40googlegroups.com.

 

Gachoud Philippe

unread,
Dec 3, 2019, 7:59:37 AM12/3/19
to Eiffel Users
Many Thx Alexander!

Adapting the code I had, I had to add as first argument to bash or sh the `-c` to avoid getting a `cannot execute binary file` error

My final code which could be useful for future readings, working on a debian 9 linux is

feature -- Commands

piped_command_result (a_command: STRING): detachable PROCESS_COMMAND_RESULT
local
l_cmd: READABLE_STRING_32
l_args: ARRAYED_LIST [READABLE_STRING_32]
l_proc: like {BASE_PROCESS_FACTORY}.process_launcher
l_err, l_res: STRING
l_err_spec, l_res_spec: SPECIAL [NATURAL_8]
do
create l_res.make (0)
create l_err.make (0)
create l_res_spec.make_filled (0, 1024)
create l_err_spec.make_filled (0, 1024)

            l_cmd := (create {EXECUTION_ENVIRONMENT}).default_shell
            if l_cmd.is_empty then
               l_cmd := {STRING_32} "sh"
            end
            create l_args.make (2)
            l_args.extend ("-c")
            l_args.extend (a_command)

            l_proc := (create {BASE_PROCESS_FACTORY}).process_launcher (l_cmd, l_args, Void)
l_proc.set_hidden (True)
l_proc.set_separate_console (False)
l_proc.redirect_output_to_stream
l_proc.redirect_error_to_stream

l_proc.launch
check
process_launched: l_proc.launched
then
-- read output
from
until
l_proc.has_output_stream_closed or l_proc.has_output_stream_error
loop
l_proc.read_output_to_special (l_res_spec)
append_special_of_natural_8_to_string_8 (l_res_spec, l_res)
end
-- read error
from
until
l_proc.has_error_stream_closed or l_proc.has_error_stream_error
loop
l_proc.read_error_to_special (l_err_spec)
append_special_of_natural_8_to_string_8 (l_err_spec, l_err)
end

l_proc.wait_for_exit
create Result.make (l_proc.exit_code, l_res, l_err)
end
ensure
instance_free: Class
end

feature {NONE} -- Implementation

append_special_of_natural_8_to_string_8 (spec: SPECIAL [NATURAL_8]; a_output: STRING)
local
i,n: INTEGER
do
from
i := spec.lower
n := spec.upper
until
i > n
loop
a_output.append_code (spec[i])
i := i + 1
end
ensure
instance_free: Class
end


I'll take advantage to post it on stackoverflow too for others to find it easier than into google groups


On Monday, December 2, 2019 at 5:16:33 PM UTC, Alexander Kogtenkov wrote:
You can use something like that:
 
           command: READABLE_STRING_32
           arguments: ARRAYED_LIST [READABLE_STRING_32]
           directory: READABLE_STRING_32
 
            command := (create {EXECUTION_ENVIRONMENT}).default_shell
            if command.is_empty then
               command := {STRING_32} "sh"
            end
            create arguments.make (1)
            arguments.extend ({STRING_32} "/usr/bin/md5sum /etc/hosts | cut -f1 -d")
            directory := ...
            p := (create {BASE_PROCESS_FACTORY}).process_launcher (command, arguments, directory)
            ...
 
Hope this helps,
Alexander Kogtenkov
 
 
Понедельник, 2 декабря 2019, 19:38 +03:00 от Gachoud Philippe <ph.g...@gmail.com>:
 
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users+unsubscribe@googlegroups.com.

Gachoud Philippe

unread,
Dec 3, 2019, 5:43:25 PM12/3/19
to Eiffel Users
Unfortunately with a bzip command, it seems that it goes on with a child process which doesn't `wait_for_exit`. 
Anybody has a solution ?
1) reaching the child process for wait_for_exit?
2) working around with a crappy wait? what procedure in eiffel does that?

Thx

Alexander Kogtenkov

unread,
Dec 4, 2019, 12:50:35 AM12/4/19
to eiffel...@googlegroups.com
This does not seem to be Eiffel-specific, however, would you describe the behavior you encounter and the behavior you want to have with some more details (exact command line, etc.)?
 
Regards,
Alexander Kogtenkov
 
 
Gachoud Philippe <ph.ga...@gmail.com>:

Gachoud Philippe

unread,
Dec 4, 2019, 6:37:34 AM12/4/19
to Eiffel Users
Sorry for the noise, it was my code which had an error, and interpreted it as it wasn't waiting :$

the function I posted is working, even tested with 

piped_command_result ("sleep 20")

Thx for your precious help!

Gachoud Philippe

unread,
Dec 4, 2019, 5:14:06 PM12/4/19
to Eiffel Users
Hi all, a bit of noise too but useful for some lets hope,

TL;DR: put the whole path of a command, even for the shell to use, not "sh" but "/bin/sh" or "/bin/bash" if you prefer

I had a hard time discovering that using apache libfgi the environment is different... so the shell should be with complete path (or $PATH setted into apache config or www-data config, but wanted to avoid more configurations on various machines and configuration specific dependencies rather than into eiffel code)

so the whole code using with

piped_command_result ("/bin/bzip2 -d --stdout /tmp/my_file.bz2|/usr/bin/md5sum|/usr/bin/cut -d' ' -f1")



for apache or other user should be

feature -- Commands

piped_command_result (a_command: STRING): detachable PROCESS_COMMAND_RESULT
local
l_cmd: READABLE_STRING_32
l_args: ARRAYED_LIST [READABLE_STRING_32]
l_proc: like {BASE_PROCESS_FACTORY}.process_launcher
l_err, l_res: STRING
l_err_spec, l_res_spec: SPECIAL [NATURAL_8]
do
create l_res.make (0)
create l_err.make (0)
create l_res_spec.make_filled (0, 1024)
create l_err_spec.make_filled (0, 1024)

            l_cmd := (create {EXECUTION_ENVIRONMENT}).default_shell
            if l_cmd.is_empty then
               l_cmd := {STRING_32} "/bin/bash" -- or "/bin/sh"

Gachoud Philippe

unread,
Oct 14, 2020, 9:21:15 AM10/14/20
to Eiffel Users
After many times using this function 'adapted above' I have a hangout on 'read_output_to_special' anybody any idea how to fix it and why?

Thx in advance

    piped_command_result (a_command: STRING): detachable PROCESS_COMMAND_RESULT
            -- https://groups.google.com/forum/#!topic/eiffel-users/O9KEtBSPrf4
        local
            l_cmd: READABLE_STRING_32
            l_args: ARRAYED_LIST [READABLE_STRING_32]
            l_proc: like {BASE_PROCESS_FACTORY}.process_launcher
            l_err, l_res: STRING
            l_err_spec, l_res_spec: SPECIAL [NATURAL_8]
        do
            {SIT_UTIL}.write_debug ("%Npiped_command_result->start cmd:" + a_command + "")

            create l_res.make (0)
            create l_err.make (0)
            create l_res_spec.make_filled (0, 1024)
            create l_err_spec.make_filled (0, 1024)

            l_cmd := (create {EXECUTION_ENVIRONMENT}).default_shell
            if l_cmd.is_empty then
               l_cmd := {STRING_32} "/bin/bash"
            end

            create l_args.make (2)
            l_args.extend ("-c")
            l_args.extend (a_command)

            l_proc := (create {BASE_PROCESS_FACTORY}).process_launcher (l_cmd, l_args, Void)
            l_proc.set_hidden (True)
            l_proc.set_separate_console (False)
            l_proc.redirect_output_to_stream
            l_proc.redirect_error_to_stream
            {SIT_UTIL}.write_debug ("piped_command_result->launch cmd:" + a_command + "")

            l_proc.launch
            check
                process_launched: l_proc.launched
            then
                -- read output
                from
                until
                    l_proc.has_output_stream_closed or l_proc.has_output_stream_error
                loop
                    {SIT_UTIL}.write_debug ("piped_command_result->read_output_to_special cmd:" + a_command + "")

                    l_proc.read_output_to_special (l_res_spec)
                    append_special_of_natural_8_to_string_8 (l_res_spec, l_res)
                end
                -- read error
                from
                until
                    l_proc.has_error_stream_closed or l_proc.has_error_stream_error
                loop
                    {SIT_UTIL}.write_debug ("piped_command_result->read_error_to_special cmd:" + a_command + "")

                    l_proc.read_error_to_special (l_err_spec)
                    append_special_of_natural_8_to_string_8 (l_err_spec, l_err)
                end
                {SIT_UTIL}.write_debug ("piped_command_result->waiting for exit cmd:" + a_command + "")

                l_proc.wait_for_exit
--                {SIT_UTIL}.write_info ("piped_command_result-> cmd:'" + a_command + "' l_res:" + l_res + " l_err:" + l_err)
                if l_res.ends_with ("%N") then
                    l_res.remove_tail (1)
                end

                create Result.make (l_proc.exit_code, l_res, l_err)
                {SIT_UTIL}.write_debug ("piped_command_result->END cmd:" + a_command + "")

            end
        ensure
            instance_free: Class
        end
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-users...@googlegroups.com.

Alexander Kogtenkov

unread,
Oct 17, 2020, 11:36:41 AM10/17/20
to eiffel...@googlegroups.com
What kind of command do you run? Does it exit? Also, is output stream processed correctly whereas error stream hangs?
 
Alexander Kogtenkov

Gachoud Philippe <ph.ga...@gmail.com>:
 

Gachoud Philippe

unread,
Oct 18, 2020, 10:57:37 AM10/18/20
to eiffel...@googlegroups.com
Hi,

thx for you answer! could you be more specific on "is output stream processed", how can I add a debug msg for that?

One command it hangs on for example is just finding a needle in a haystack:

read_output_to_special cmd:grep cb68c7aaa68cdf9ab22006d5d7d894ef /data/plants_data/sma_cc/sanBernardoSmall/2020/06/imported_files_md5_sums



--
**********************************************
Philippe Gachoud
Puerto Williams 6657
Las Condes
Santiago de Chile
RUT: 26374747-k
**********************************************

Gachoud Philippe

unread,
Oct 18, 2020, 11:23:34 AM10/18/20
to eiffel...@googlegroups.com

I could reproduce it with 2 simple functions called one after the other into the same ewf_app

image.png
after a while a second child process is created and hangs on it. When killing the child process (the one with 364k) it continues:
image.png
Some more details about the processes:
image.png
Finally the code of test you can surely do shorter...

test (a_rest_request: REST_REQUEST): like callable_json_feature_result
-- returns a JSON OBJECT
-- arg1 is pi ID
--
-- data: { "action": { "json_feature": "test" }}
require
attached a_rest_request.request_json_feature as l_jrf
l_jrf.arguments.count = 0
not has_error
local
l_json_res: JSON_OBJECT
l_pi_pk: like item_prototype.primary_key
l_sum: like {OS}.uncompressed_md5sum
i: INTEGER
do
create l_json_res.make_empty
check
attached a_rest_request.request_json_feature as l_jf
then
from
i := 1
until
i > 10000
loop
logger.write_information ("test-> start")
l_sum := {OS}.uncompressed_md5sum (create {PATH}.make_from_string ("/mnt/data/plants_data/sma_im/ovalle/2020/10/20201015_00-90-E8-6A-AF-22_192.168.0.34_125_sit_modbus_device.py.csv"))
logger.write_information ("test-> end")

i := i + 1
end
end
Result := l_json_res
ensure
all_items_empty
end

test2 (a_rest_request: REST_REQUEST): like callable_json_feature_result
-- returns a JSON OBJECT
-- arg1 is pi ID
--
-- data: { "action": { "json_feature": "test2" }}
require
attached a_rest_request.request_json_feature as l_jrf
l_jrf.arguments.count = 0
not has_error
local
l_json_res: JSON_OBJECT
l_pi_pk: like item_prototype.primary_key
l_sum: like {OS}.uncompressed_md5sum
i: INTEGER
do
create l_json_res.make_empty
check
attached a_rest_request.request_json_feature as l_jf
then
from
i := 1
until
i > 10000
loop
logger.write_information ("test2-> start")
if attached {OS}.piped_command_result ("sleep 10") as l_res then
if l_res.exit_code = 0 then
do_nothing
end
end
logger.write_information ("test2-> end")


i := i + 1
end
end
Result := l_json_res
ensure
all_items_empty
end



Alexander Kogtenkov

unread,
Oct 18, 2020, 11:46:20 AM10/18/20
to eiffel...@googlegroups.com
I wanted to see if the application is stuck when reading from standard output or from standard error.
 
Does the command complete successfully when running from the command line? It looks like the application starts reading from the standard output of the command, but never finishes it, right? Does the command generate a lot of data on standard error instead?
 
Alexander Kogtenkov

Gachoud Philippe <ph.ga...@gmail.com>:
 

Gachoud Philippe

unread,
Oct 18, 2020, 1:25:43 PM10/18/20
to eiffel...@googlegroups.com
I hangs on reading standard output, the standard error comes after into the piped_command_result

Alexander Kogtenkov

unread,
Oct 18, 2020, 1:44:46 PM10/18/20
to eiffel...@googlegroups.com
What about running
 
    grep cb68c7aaa68cdf9ab22006d5d7d894ef /data/plants_data/sma_cc/sanBernardoSmall/2020/06/imported_files_md5_sums > out.txt 2> err.txt
 
from the command line? How long does it take to run? Where does it send the output?
 
 
Alexander Kogtenkov

Gachoud Philippe <ph.ga...@gmail.com>:
 

Gachoud Philippe

unread,
Oct 18, 2020, 2:47:46 PM10/18/20
to eiffel...@googlegroups.com
Sorry not answering this question because I dont remember in which context it hanged and if the file was present or not.
The case I'm now able to reproduce is with
  • test1: one process with an md5sum: /usr/bin/md5sum /mnt/data/plants_data/sma_im/ovalle/2020/10/20201015_00-90-E8-6A-AF-22_192.168.0.34_125_sit_modbus_device.py.csv | /usr/bin/cut -d ' ' -f1
  • test2: another one which does a sleep 10
  1. start the web app
  2. throw a curl on test1
  3. about 3 seconds later, throw a curl on test 2
  4. it start with md5sum, then does only one time the test2 sleep and then hangs on the test2 process but continues with endless test1 processes

    any idea or do you need me to try to make a much more simple reproducible case...


    attached the code of test1 and test2


test1_and_2.txt

Alexander Kogtenkov

unread,
Oct 18, 2020, 3:02:29 PM10/18/20
to eiffel...@googlegroups.com
Does it help if you replace `sleep 10` with `env sleep 10`?
 
BTW, I suggest using some other channel of interaction on this specific question because it’s unlikely of interest to the readers of the mailing list.
 
Alexander Kogtenkov

Gachoud Philippe <ph.ga...@gmail.com>:
 

Gachoud Philippe

unread,
Oct 18, 2020, 3:42:59 PM10/18/20
to eiffel...@googlegroups.com
Of course, ph.ga...@gmail.com or signal: +56934022210 many thx for your help. The answer with env is no, after 3 occurrences it hangs up

Ulrich Windl

unread,
Oct 19, 2020, 2:49:16 AM10/19/20
to eiffel...@googlegroups.com
>>> Gachoud Philippe <ph.ga...@gmail.com> schrieb am 18.10.2020 um 16:57 in
Nachricht
<CAB+bLA9-0SNFhi7QUmNOxx5y...@mail.gmail.com>:
> Hi,
>
> thx for you answer! could you be more specific on "is output stream
> processed", how can I add a debug msg for that?
>
> One command it hangs on for example is just finding a needle in a haystack:
>
> read_output_to_special cmd:grep cb68c7aaa68cdf9ab22006d5d7d894ef
> /data/plants_data/sma_cc/sanBernardoSmall/2020/06/imported_files_md5_sums
>

Hi!

I wonder: Could it be as simple as "the command produces no output"?

Regards,
Ulrich
>> My *final code* which could be useful for future readings, working on a
> *debian
>> 9 linux* is
<https://stackoverflow.com/questions/57154963/eiffel-how-do-i-do-a-system-call
<http://e.mail.ru/compose/?mailto=mailto%3aeiffel%2dusers%2bunsubscribe@google

> groups.com>
>> .
>> To view this discussion on the web visit
>>
>
https://groups.google.com/d/msgid/eiffel-users/eabe27c1-f64d-4d6b-b44a-d7d73c

> 05a432%40googlegroups.com
>>
>
<https://groups.google.com/d/msgid/eiffel-users/eabe27c1-f64d-4d6b-b44a-d7d73c

> 05a432%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Eiffel Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to eiffel-users...@googlegroups.com
>>
>
<//e.mail.ru/compose/?mailto=mailto%3aeiffel%2dusers%2bunsubscribe@googlegroup
> s.com>
>> .
>> To view this discussion on the web visit
>>
>
https://groups.google.com/d/msgid/eiffel-users/caf1c14c-c5e6-4d76-82fc-d0e0dc

> 484c58n%40googlegroups.com
>>
>
<https://groups.google.com/d/msgid/eiffel-users/caf1c14c-c5e6-4d76-82fc-d0e0dc

> 484c58n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Eiffel Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to eiffel-users...@googlegroups.com.
>> To view this discussion on the web visit
>>
>
https://groups.google.com/d/msgid/eiffel-users/1602948998.375118363%40f502.i.
> mail.ru
>>
>
<https://groups.google.com/d/msgid/eiffel-users/1602948998.375118363%40f502.i.
> mail.ru?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> **********************************************
> Philippe Gachoud
> Puerto Williams 6657
> Las Condes
> Santiago de Chile
> +56 934022210
> ph.ga...@gmail.com
> RUT: 26374747-k
> **********************************************
>
> --
> You received this message because you are subscribed to the Google Groups
> "Eiffel Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to eiffel-users...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/eiffel-users/CAB%2BbLA9-0SNFhi7QUmNOxx5yNS0

> ySAMKAD7QFZBRT3H7ntW9nw%40mail.gmail.com.



Gachoud Philippe

unread,
Oct 19, 2020, 6:23:31 AM10/19/20
to eiffel...@googlegroups.com
Hi Ulrich,
the command hangs on l_proc.read_output_to_special (l_res_spec) after some o concurrent calls, a side process stays in OS hanging till I kill it, then only the other continues
Hope I answered your question.

Ulrich Windl

unread,
Oct 19, 2020, 7:52:16 AM10/19/20
to eiffel...@googlegroups.com
Hi!

I had just been wondering what could be special for the grap command: Either
produce a lot of output or produce no output at all.
Anyway: Did you try to "strace -f" your application?

Regards,
Ulrich

>>> Gachoud Philippe <ph.ga...@gmail.com> schrieb am 19.10.2020 um 12:23 in
Nachricht
<CAB+bLA-WOVArkS1nzzF4Xx_A...@mail.gmail.com>:
https://groups.google.com/d/msgid/eiffel-users/CAB%2BbLA-WOVArkS1nzzF4Xx_A0QJ

> bz2JpFykvE7-hv5X5xHdESA%40mail.gmail.com.



Gachoud Philippe

unread,
Oct 19, 2020, 8:03:55 AM10/19/20
to eiffel...@googlegroups.com
Hi,
this grep should produce 1 result (where the file should contain the md5sum of this file) or no output (I treat csv processed files like that marking them as processed into a txt file with their md5sum when done)
Thx for the strace hint, I didn't know it! I'll take a closer look

Reply all
Reply to author
Forward
0 new messages