CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
can any body tell me??



Oct 31, 2001, 1:40 AM

Post #1 of 6 (2526 views)
can any body tell me?? Can't Post

what is this meant

rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0


Nov 2, 2001, 6:20 AM

Post #2 of 6 (2513 views)
Re: can any body tell me?? [In reply to] Can't Post

It doesn't look like perl to me.

I can image SIG_BLOCK and NULL are constants.
I don't understand the [ ] nor the = sign at the end. (unless it's not perl)


Nov 3, 2001, 9:41 AM

Post #3 of 6 (2508 views)
Re: can any body tell me?? [In reply to] Can't Post

To me, it looks like a line from the Perl source (in C). Where did you get that code snippet? That would be helpful in answering your question.


Nov 3, 2001, 4:45 PM

Post #4 of 6 (2504 views)
Re: can any body tell me?? [In reply to] Can't Post


i threw it into my trusty DZsoft perl editor, just to see if it would error out, and it did not error out (other than the fact that it did not have that sub routine to call to) so i figure if nothing else, it is simply a call to that sub-routine, with those 4 constants sent to it also., the = 0 at the end.. just a thought, but could that be a way of faking perl into believing that the sub routine always returns 0?

i am pretty much just winging it on those suggestions, but i do ask that if anyone can rule them out, let me know, cause i am also curious..

I Hope this helps...

perl programmers don't die.. they just start writing a new script.


Nov 4, 2001, 11:17 PM

Post #5 of 6 (2497 views)
Re: can any body tell me?? [In reply to] Can't Post

this is getting on this command
strace -p pid
where pid is your process id.
i think when program went into some infinite loops or gets hanging with other reasons this occurs repeatedly

rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

Enthusiast / Moderator

Nov 5, 2001, 10:01 PM

Post #6 of 6 (2490 views)
Re: can any body tell me?? [In reply to] Can't Post

So, now we know at least that this isn't a Perl question. Wink

As always, Google was very helpful in finding an answer. The strace command traces the system calls a process makes. So, when a process opens a file, you'll see a line like

open("/dev/null", O_RDONLY) = 3

This has nothing to do with Perl, except for the fact that sometimes you open files in Perl scripts, too. The mysterious looking =3 at the end of line isn't that mysterious if you know that the output isn't supposed to be Perl code. It's simply the return value of the system call.
Now, what made even me believe in the first place that your snippet could be Perl code was the use of [ ] (reference to empty array):

rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0

But what looks like an empty array is in fact a bit field with no bits set at all. If you had some bits set, this might have looked like

rt_sigprocmask(SIG_SETMASK, [CHLD TTOU], NULL, 8) = 0

And this is a syntax error in Perl.

Hope this helps.

-- Marcus



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives