about summary refs log tree commit diff
path: root/lib/libsystem.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libsystem.c')
-rw-r--r--lib/libsystem.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/lib/libsystem.c b/lib/libsystem.c
index 91caf7e2..30b6b2be 100644
--- a/lib/libsystem.c
+++ b/lib/libsystem.c
@@ -135,8 +135,8 @@ execProgram(const char *  const progName,
 
 
 static void
-createPipeFeeder(void          pipeFeederRtn(int, void *), 
-                 void *  const feederParm, 
+createPipeFeeder(void          pipeFeederRtn(int, void *),
+                 void *  const feederParm,
                  int *   const fdP,
                  pid_t * const pidP) {
 /*----------------------------------------------------------------------------
@@ -150,7 +150,7 @@ createPipeFeeder(void          pipeFeederRtn(int, void *),
     pm_pipe(pipeToFeed);
     rc = fork();
     if (rc < 0) {
-        pm_error("fork() of stdin feeder failed.  errno=%d (%s)", 
+        pm_error("fork() of stdin feeder failed.  errno=%d (%s)",
                  errno, strerror(errno));
     } else if (rc == 0) {
         /* This is the child -- the stdin feeder process */
@@ -200,13 +200,13 @@ spawnProcessor(const char *  const progName,
 
     rc = fork();
     if (rc < 0) {
-        pm_error("fork() of processor process failed.  errno=%d (%s)", 
+        pm_error("fork() of processor process failed.  errno=%d (%s)",
                  errno, strerror(errno));
     } else if (rc == 0) {
         /* The program child */
 
         int stdoutFd;
-        
+
         if (pipeStdout) {
             close(stdoutpipe[0]);
             stdoutFd = stdoutpipe[1];
@@ -240,7 +240,7 @@ signalName(unsigned int const signalClass) {
 /* There are various signal classes that are not universally defined,
    so we make a half-hearted attempt to determine whether they are and
    not try to recognize the ones that aren't.  We do this by testing
-   whether a macro is defind with the signal class name.  That could give
+   whether a macro is defined with the signal class name.  That could give
    a false negative, because the signal class name isn't necessarily
    defined as a macro, but it's a really, really small problem to miss
    one of these signal classes here, so we don't bother with all the work
@@ -342,7 +342,7 @@ pm_termStatusDesc(int const termStatusArg) {
        for a BSD 'union wait' (instead of int) argument to WIFEXITED.  The
        magic involves defining a variable with 'typeof' the argument and
        assigning to that variable.
-       
+
        To work around this, we make sure the argument is not constant.
     */
 
@@ -436,14 +436,14 @@ pm_system2_vp(const char *    const progName,
        program process and the current process and have the program
        write its Standard Output to that pipe.  The current process
        runs 'stdoutAccepter' to read the data from that pipe.
-       
+
        But if 'stdoutFeeder' is NULL, we just tell the program process
        to write to the current process' Standard Output.
 
        So there are two processes when stdinFeeder is NULL and three when
        stdinFeeder is non-null.
     */
-    
+
     int progStdinFd;
         /* File descriptor that the processor program will get as Standard
            Input
@@ -469,9 +469,9 @@ pm_system2_vp(const char *    const progName,
         int progStdoutFd;
 
         /* Make a child process to run the program and pipe back to us its
-           Standard Output 
+           Standard Output
         */
-        spawnProcessor(progName, argArray, progStdinFd, 
+        spawnProcessor(progName, argArray, progStdinFd,
                        &progStdoutFd, &processorPid);
 
         /* Dispose of the stdout from that child */
@@ -493,7 +493,7 @@ pm_system2_vp(const char *    const progName,
 
     waitpid(processorPid, &termStatus, 0);
 
-    if (feederPid) 
+    if (feederPid)
         cleanupFeederProcess(feederPid);
 
     *termStatusP = termStatus;
@@ -530,7 +530,7 @@ pm_system2_lp(const char *    const progName,
          !endOfArgs;
         ) {
         const char * const arg = va_arg(args, const char *);
-        
+
         REALLOCARRAY(argArray, n+1);
 
         argArray[n++] = arg;
@@ -570,7 +570,7 @@ pm_system2(void stdinFeeder(int, void *),
    Return as *termStatusP the termination status of the processor process
    (the one running the program named 'progName').
 -----------------------------------------------------------------------------*/
-    pm_system2_lp("/bin/sh", 
+    pm_system2_lp("/bin/sh",
                   stdinFeeder, feederParm, stdoutAccepter, accepterParm,
                   termStatusP,
                   "sh", "-c", shellCommand, NULL);
@@ -635,7 +635,7 @@ pm_system_lp(const char *    const progName,
          !endOfArgs;
         ) {
         const char * const arg = va_arg(args, const char *);
-        
+
         REALLOCARRAY(argArray, n+1);
 
         argArray[n++] = arg;
@@ -726,15 +726,15 @@ pm_feed_from_memory(int    const pipeToFeedFd,
                     void * const feederParm) {
 
     pm_bufferDesc * const inputBufferP = feederParm;
-    
+
     FILE * const outFileP = fdopen(pipeToFeedFd, "w");
-    
+
     size_t bytesTransferred;
 
     /* The following signals (and normally kills) the process with
        SIGPIPE if the pipe does not take all 'size' bytes.
     */
-    bytesTransferred = 
+    bytesTransferred =
         fwrite(inputBufferP->buffer, 1, inputBufferP->size, outFileP);
 
     if (inputBufferP->bytesTransferredP)
@@ -750,7 +750,7 @@ pm_accept_to_memory(int             const pipetosuckFd,
                     void *          const accepterParm ) {
 
     pm_bufferDesc * const outputBufferP = accepterParm;
-    
+
     FILE * const inFileP = fdopen(pipetosuckFd, "r");
 
     size_t bytesTransferred;