× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





Scott,


So the child job won't create a job log when there is an error? I am using
the spawn api to spawn jobs from a general purpose socket listener. There
are a ton of job logs that only have the job start and job end.

Thanks,
Mark





date: Tue, 11 Dec 2007 12:01:17 -0600
from: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx>
subject: Re: Spawn API - Setting Flags

Flags are a subfield of the inheritance data structure. You can set
more than one flag by adding them together.

inh = *ALLx'00';
int.flags = SPAWN_SETLOGJOBMSGNONE_NP
+ SPAWN_SETJOBNAMEPARENT_NO;

pid = spawn(path: 0: *omit: inh: argv: envp);

In this example, I've specified two flags. One to tell it not to log
messages, and another to tell it to use the job name of the parent job.

Since there won't be a job log, it'd be wise to use waitpid() -- which I
prefer to use in conjunction with SIGCHLD -- to monitor the status of
the job you spawned.


mgarton@xxxxxxxxxxxxxxx wrote:

I am trying to use the spawn api using Scott Klement's example from the
System i News article "Don't Submit, Spawn"
(http://www.systeminetwork.com/artarchive/19025/Don_t_Submit__Spawn_.html
).
Pardon my ignorance, but how do I set a flag? The child job is creating
job logs unnecessarily so I would like to set ON the
SPAWN_SETLOGJOBMSGNONE_NP flag.


------------------------------

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) digest list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.







As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.