* a question: handling tasks
@ 2005-12-13 15:29 KERNEL_C
2005-12-13 16:02 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: KERNEL_C @ 2005-12-13 15:29 UTC (permalink / raw)
To: linux-kernel
Hi,
I'm trying to develop an application through traditional c
language, which is gonna run as a single instance within the system.
Been looking on the internet for singleton (which seems to stand for OO
programming languages, single instance appl, etc.), and also seen
howtos and papers talking about user and kernel modes.
Maybe the right
solution would be to use sempahores and threads, but I get confused
because almost all the doc on this is written for solaris which hasn't
got the same API as pthreads.
The thing is that, in case of the user
trying to execute another instance of the appl. the already running one
could catch the first argument used to call the second instance and
pass it through a function.
I know this is not the right place for
asking this, been looking for weeks, and I haven't found any document
on the internet on how to do somehting like this with linux, and for
sure any of you could bring some light into this.
Kind Regards,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: a question: handling tasks
2005-12-13 15:29 a question: handling tasks KERNEL_C
@ 2005-12-13 16:02 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2005-12-13 16:02 UTC (permalink / raw)
To: KERNEL_C; +Cc: linux-kernel
On Maw, 2005-12-13 at 16:29 +0100, KERNEL_C@telefonica.net wrote:
> The thing is that, in case of the user
> trying to execute another instance of the appl. the already running one
> could catch the first argument used to call the second instance and
> pass it through a function.
Not really a kernel question. Various daemons implement something
similar using simple file locks and then sockets to pass messages
between instances of a program.
It's not the usual mentality of Linux/Unix programs but you'll find
examples that do it to look at - one is evolution, another is
mozilla/firefox as shipped by at least Fedora (not all vendors use the
single instance/multiple windows code). Various other gnome apps such as
gnome terminal support this way of working too and Gnome implements a
set of factory objects and activation system for this purpose
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-13 16:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-13 15:29 a question: handling tasks KERNEL_C
2005-12-13 16:02 ` Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.