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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



aggrohit
stranger

Oct 31, 2001, 1:40 AM

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

what is this meant

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





yapp
User

Nov 2, 2001, 6:20 AM

Post #2 of 6 (943 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)



Jasmine
Administrator

Nov 3, 2001, 9:41 AM

Post #3 of 6 (938 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.




randor
User

Nov 3, 2001, 4:45 PM

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

well,

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.


aggrohit
stranger

Nov 4, 2001, 11:17 PM

Post #5 of 6 (927 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





mhx
Enthusiast / Moderator

Nov 5, 2001, 10:01 PM

Post #6 of 6 (920 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

Code
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):

Code
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

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

And this is a syntax error in Perl.

Hope this helps.

-- Marcus


Code
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= 
($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"


 
 


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

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