[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] [XaAES] shel_write
Hello,
Something with is differing between XaAES and MagiC 6.
XaAES have two shel_write extensions:
#define SW_UID 0x1000 /* Set user id of launched child */
#define SW_GID 0x2000 /* Set group id of launched child */
The problem is that MagiC since version 6 have also a new extension:
#define SHW_XMDFLAGS 4096
Yes, and moreover, the SHELW structure differs because of these
extensions. In gemlib, this is "solved" by using two differents name for
the same thing: SHELW for XaAES and XSHW_COMMAND for magic 6.
I think we'll have to live with this incompatibility issue :(
Here are the definitions from gemlib (just updated on the subject):
typedef struct
{
/** points to the filename formatted in the manner indicated
* above
*/
char *newcmd;
/** contains the maximum memory size available to the process
* only used if the extended mode #SW_PSETLIMIT is set
*/
long psetlimit;
/** contains the process priority of the process to launch
* only used if the extended mode #SW_PRENICE is set
*/
long prenice;
/** points to a character string containing the default directory
* for the application begin launched.
* only used if the extended mode #SW_DEFDIR is set
*/
char *defdir;
/** points to a valid environment string for the process
* only used if the extended mode #SW_ENVIRON is set
*/
char *env;
/** New child's UID (user id)
* only used if the extended mode #SW_UID is set
*/
short uid;
/* New child's GID (group id)
* only used if the extended mode #SW_GID is set
*/
short gid;
} SHELW;
/** similar to ::SHELW, with MagiC 6 only specificity, and without
XaAES/oAESis extensions */
typedef struct
{
char *command; /**< see SHELW::newcmd */
long limit; /**< see SHELW::psetlimit */
long nice; /**< see SHELW::prenice */
char *defdir; /**< see SHELW::defdir */
char *env; /**< see SHELW::env */
long flags; /**< since MagiC 6. only used if the extended mode
#SHW_XMDFLAGS is set*/
} XSHW_COMMAND;
Best regards,
Arnaud.