Re: background/SIGTERM
- From: "René H. Hartman" <sorry@xxxxxxxxxxx>
- Date: Thu, 4 Aug 2005 19:30:01 +0200
Please see below.
--
"Wolf Grossi" <ng-wg@xxxxxxxxxxxxxx> schreef in bericht
news:42f24b39$0$3855$79720d31@xxxxxxxxxxxxxxxxxxxxxx
> Hi all,
>
> back again :-) and a bunch'o questions popup on my UNIX-C-app porting:
>
> 1) what is the proper way start a TCP-server?
> Currently I do a CALL MYLIB/MYSERVER but this blocks the session.
> Can I start the server in background-mode, as I'd say on *nix?
Sure can. It's called submitting and basically you do a SBMJOB MYSERVER
CMD(CALL MYLIB/MYSERVER) JOBQ(QSYSNOMAX)
The use of QSYSNOMAX may be debatable for purists, but for now it's sure
to do the trick. You may tune things later when you get more familiar
with the concept.
>
> Am I right assuming that on OS400 a daemon is something to be afraid
> of :-) and not a standalone-process?
Essentially a batch job is a standalone process, but that's a matter of
definition. It does require an active subsystem to run in, but it's not
dependent on other jobs..
>
> 2) To terminate the server I curently use WRKACTJOB and then terminate
> with ENDJOB. But this does not seem to be the right approach as the
> interactive session I've started the server terminates...
That's because you a never ending command in your interactive session;
you kill the job, you kill the session.
Interactively you can hit Sytem Request and take option 2, issuing an
ENDRQS to your running command. That'll kill the server, not your job.
In the batch situation, obviously killing the job just kills the server.
>
> I have searched the various docs at IBM iSeries Information Center,
but
> apparently I'm using the wrong wording :-)).
> 'kill' brings a good description but refers to the qsh...
OS/400 terminology is ENDJOB, but effectively it kills it. You can make
your server sense on controlled endjob requests and end gracefully, or
you may send it an endrequest through a message queue or dataqueue. But
that's probably for later...
>
> Thanks for reading and remarks,
> Wolf
You're welcome
.
- Follow-Ups:
- Re: background/SIGTERM
- From: Wolf Grossi
- Re: background/SIGTERM
- References:
- background/SIGTERM
- From: Wolf Grossi
- background/SIGTERM
- Prev by Date: background/SIGTERM
- Next by Date: Re: AFPRSC not printing image in *AFPDS printfile.
- Previous by thread: background/SIGTERM
- Next by thread: Re: background/SIGTERM
- Index(es):
Relevant Pages
|