Back to index

lightning-sunbird  0.9+nobinonly
Classes | Typedefs | Enumerations | Functions | Variables
plgetopt.h File Reference
#include "prtypes.h"

Go to the source code of this file.

Classes

struct  PLOptState

Typedefs

typedef
typedefPR_BEGIN_EXTERN_C
struct 
PLOptionInternal
typedef struct PLOptState PLOptState

Enumerations

enum  PLOptStatus { PL_OPT_OK, PL_OPT_EOL, PL_OPT_BAD }

Functions

 PR_EXTERN (PLOptState *) PL_CreateOptState(PRIntn argc
 PR_EXTERN (void) PL_DestroyOptState(PLOptState *opt)
 Sets SecurityCotext for proxy env.
 PR_EXTERN (PLOptStatus) PL_GetNextOpt(PLOptState *opt)

Variables

char ** argv
char const char * options

Class Documentation

struct PLOptState

Definition at line 60 of file plgetopt.h.

Collaboration diagram for PLOptState:
Class Members
PLOptionInternal * internal
char option
const char * value

Typedef Documentation

typedef typedefPR_BEGIN_EXTERN_C struct PLOptionInternal

Definition at line 51 of file plgetopt.h.

typedef struct PLOptState PLOptState

Enumeration Type Documentation

Enumerator:
PL_OPT_OK 
PL_OPT_EOL 
PL_OPT_BAD 

Definition at line 53 of file plgetopt.h.

{
        PL_OPT_OK,              /* all's well with the option */
        PL_OPT_EOL,             /* end of options list */
        PL_OPT_BAD              /* invalid option (and value) */
} PLOptStatus;

Function Documentation

PR_EXTERN ( void  )

Sets SecurityCotext for proxy env.

Sets SecurityCotext for proxy env.

  1. the array to sort
    1. the number of elements in the array
    2. the size of each array element
    3. comparison function taking two elements and parameter #5 and returning an integer:
      • less than zero if the first element should be before the second
      • 0 if the order of the elements does not matter
      • greater than zero if the second element should be before the first
    4. extra data to pass to comparison function

Definition at line 972 of file irix.c.

{
PRThread *me = _PR_MD_CURRENT_THREAD();

       /*
        * the exit code of the process is the exit code of the primordial
        * sproc
        */
       if (!_PR_IS_NATIVE_THREAD(me) && (_PR_MD_CURRENT_CPU()->id == 0)) {
              /*
               * primordial sproc case: call _exit directly
               * Cause SIGKILL to be sent to other sprocs
               */
              prctl(PR_SETEXITSIG, SIGKILL);
              _exit(status);
       } else {
              int rv;
              char data;
              sigset_t set;

              /*
               * non-primordial sproc case: cause the primordial sproc, cpu 0,
               * to wakeup and call _exit
               */
              _pr_irix_process_exit = 1;
              _pr_irix_process_exit_code = status;
              rv = write(_pr_irix_primoridal_cpu_fd[1], &data, 1);
              PR_ASSERT(rv == 1);
              /*
               * block all signals and wait for SIGKILL to terminate this sproc
               */
              sigfillset(&set);
              sigsuspend(&set);
              /*
               * this code doesn't (shouldn't) execute
               */
              prctl(PR_SETEXITSIG, SIGKILL);
              _exit(status);
       }
}

Variable Documentation

char** argv

Definition at line 70 of file plgetopt.h.

char const char* options

Definition at line 70 of file plgetopt.h.