[haiku-bugs] Re: [Haiku] #12298: Running shell commands from an app fails

  • From: "ttcoder" <trac@xxxxxxxxxxxx>
  • Date: Thu, 20 Aug 2015 10:45:28 -0000

#12298: Running shell commands from an app fails
-------------------------------------+----------------------------
Reporter: humdinger | Owner: axeld
Type: bug | Status: new
Priority: blocker | Milestone: R1/beta1
Component: Servers/launch_daemon | Version: R1/Development
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
-------------------------------------+----------------------------

Comment (by ttcoder):

@axel in your comment:9 I believe you've pinpointed the heart of the
matter.. I'm digging into this as this originally just annoyed me for
Qupzilla but now I see this issue also prevents our stations from using
our "Network Preflet" so it's more important.

NetworkPreflet is a small window that displays network related info. In
previous hrevs it worked the same when launched from Terminal or Tracker.
But now, e.g. this line

{{{
int res = system("grep 'sshd:' /etc/passwd");
}}}

will return 0 when run from Terminal, yet it returns 2 when run from
Tracker.

So I've modified it like thus:

{{{
int res = system("grep 'sshd:' /etc/passwd 2> /boot/home/test");
}}}

And the file contains this:

{{{
grep: write error: Bad file descriptor
}}}

Very telling, no ?

--
Ticket URL: <https://dev.haiku-os.org/ticket/12298#comment:16>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: