473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Wrong args when issuing a SIGUSR1 signal

Hi All,

Say I launch a shell under KDE and start typing:

<code>
$ python
Python 2.4.2 (#10, Feb 16 2006, 17:44:37)
[GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1,
ssp-3.3.5.20050130-1, pie-8.7.7. on linux2
Type "help", "copyright", "credits" or "license" for
more information.
def fn(a=0,b=0): .... print 'Arguments:',a,b
.... from signal import *
signal(SIGUSR1,fn) </code>

Now, suppose I'm launching a second shell, and typing:

<code>
$ ps ax
... (cut for brevity) ...
5780 pts/2 S+ 0:00 python
5781 pts/1 R+ 0:00 ps ax
$ python
Python 2.4.2 (#10, Feb 16 2006, 17:44:37)
[GCC 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1,
ssp-3.3.5.20050130-1, pie-8.7.7. on linux2
Type "help", "copyright", "credits" or "license" for
more information. from signal import *
import os
os.kill(5780,SIGUSR1)

</code>

Now, back in the first shell, after pressing <Enter>
once, I get:

<code>
Arguments: 10 <frame object at 0x817f5a4>
</code>

Obviously, I put the two args after experimenting
without them, and receiving an error:

<code>
TypeError: fn() takes no arguments (2 given)
</code>

What is going on here? How should I handle this?

Thanks,
Sorin Schwimmer

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
May 12 '06 #1
0 1096

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: nowhere | last post by:
Hi, Java 1.4.1: I have a problem using the JNI interface to call some library methods written in java from some C code. The C code uses SIGUSR1 for asynchronous events. However JNI_CreateJVM...
7
by: José Joye | last post by:
I have a windows service where I create another appdomains. In the newly created AppDomain, I make use of a C library. If I issue an Abort(1) within this library, it simply hard stop my main...
3
by: M Herriott | last post by:
Hello to all - #1: I would have rather used an AND with the choice of newsgroups. I would like to talk to those who subscribe to comp.lang.c++ AND comp.unix.solaris - but I'm stuck with OR....
42
by: Holger | last post by:
Hi guys Tried searching for a solution to this, but the error message is so generic, that I could not get any meaningfull results. Anyways - errormessage:...
0
by: Sori Schwimmer | last post by:
Hi All, I finally put my hands on a GUI-less Linux box and tried the little signal sending experiment. It gives the same! I'm left wondering what is the frame object... Regards, Sorin...
1
by: jakebbohio | last post by:
I have a user-defined XPath function implemented using a custom context and the IXsltContextFunction interface. For its arguments, it accepts 3: { XPathResultType.Any, XPathResultType.Any,...
3
by: Rainer Borchmann | last post by:
Hi, please can anyone tell me what is wrong with this code ? i have an oszilloskop on the COM1 ,and nothing comes out of it. Rainer VS2005 .............................. private void...
1
by: Rob Horton | last post by:
Hi, I've only been using PHP for a short time so there may be a simple solution which I haven't been able to spot yet. here's the line in question: posix_kill($PidSendTo, SIGUSR1); produces...
0
by: pierreroth64 | last post by:
Hi, New with python, I've developped a small cmd line script parsing opts and args with an OptionParser: in myApp.py: ....blablabla... parser.add_option(...) parser.add_option(...)
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.