Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 616201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:18:04+00:00 2026-05-13T18:18:04+00:00

I just wrote php daemon for my app and want to implement some output

  • 0

I just wrote php daemon for my app and want to implement some output information generated on specified signal (SIGUSR1). I got signal handler in code

    pcntl_signal(SIGUSR1, array($this, 'signal_status'));

and function handler prepared

  protected function signal_status($signal_number)
  { printf("blah\n"); }

Everything work except one thing. When i send signal to my daemon (posix_kill($pid, SIGUSR1) or even simple kill -10 pid in bash) i got output in console that starts daemon.

Is it possible to get file descriptor of caller and not of the daemon? I wan’t to send this data to specified output (for example after kill -10 PID) and not into FD of daemon.

I hope i wrote this clearly 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:18:04+00:00Added an answer on May 13, 2026 at 6:18 pm

    Well, you can not, sending a signal is just setting up some operating system primitives, it has nothing to do with setting up a communication path between your daemon on one hand and the tool used to generate the signal on the other hand. The alternatives you have are either watching the console output of the daemon, or making the daemon dump status to a logfile and create some sort of utility to send the signal and print the logfile (and if you’re going that way, why not throw out the logfile altogether and setup a periodical dump of your logging anyhow, since signals are not a polite way of doing inteprocess communiation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Shared Linux hosting and some PHP I wrote just won't work with
I just wrote a PHP login script, and what I'm trying to accomplish is
I just wrote some new utility methods within a non-page class for an existing
I just wrote some code to test the behavior of std::equal, and came away
Just a quick one - I wrote a php script recently that dynamically creates
I wrote some ajax code that sends values to a php file for validation
I wrote some PHP code that will allow me to create an html dropdown
I've just installed PHPUnit and wrote a quick class which I saved to C:\PHP
I just wrote a little application(4 page php), everything work fine, however, I have
I just wrote a regex for use with the php function preg_match that contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.