Re: background - "stopped" how to kill!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06Jun2014 13:17, Rick Stevens <ricks@xxxxxxxxxxxxxx> wrote:
As you can see, there's nothing special about this. And yeah, when
runs as foo.php & <<  it shows up in the procTBL as "T" in the status.

There are no filedescriptors in the test.

It has at least one descriptor, stdout. You're having it print two
lines. If you background it, it's going to hang trying to print out to
stdout.

Try "php foo.php >/dev/null 2>&1 &" to make it write stdout and stderr
to /dev/null and see if that works.

Normally a background process can write to the tty. IIRC, that might be tunable. More common is to stop when it reads from the tty. Eg:

  % read it &
  [1] 71654
  [1]  + 71654 suspended (tty input)  read it
  %

That's zsh. Bash does the same thing but looks like this:

  % read it&
  [1] 72595
  [1]+  Stopped(SIGTTIN)        read it
  %

The other thing to try it strace. Look up the PID of your process. (Suppose it is 13.) Then:

  strace -p 13

The should tell you what system call it was making when it was suspended, and what file descriptors were involved.

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>

It is easier to optimize correct code than to correct optimized code.
- Bill Harlan
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux