[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Complete example of daemon with multiprocess
[Thread Prev] | [Thread Next]
- Subject: Complete example of daemon with multiprocess
- From: Maxy <maxy0440yxam@xxxxxxxx>
- Reply-to: Maxy <maxy0440yxam@xxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 20 Feb 2017 18:29:43 +0000 (UTC)
- To: "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
I need to make a multiprocess/multithreaded daemon (i don't mind if multi thread/process, i will use the simple way in libssh). I followed the example samplesshd-tty.c, but i have some problems. I understood the example, but it seems too simple, and mono-process (although it uses forkpty). I need some help for | cb.userdata = &fd; | | | ssh_callbacks_init(&cb); | | | ssh_set_channel_callbacks(chan, &cb); | | I don't undestand if i need it. I have a daemon that accept ssh connection, send ncurses forms to the client, and when the client finished the job, the process die.Do i really need the callbacks or i can simply use standard multiprocessing patterns? Do you have a _serious_ example of a complete program, or can you tell me a open-source program that have a similar behaviour? Thank you in advance.
Re: Complete example of daemon with multiprocess | Andreas Schneider <asn@xxxxxxxxxxxxxx> |