Changeset 481 for trunk/src/sh_calls.c


Ignore:
Timestamp:
Jul 18, 2015, 5:06:52 PM (9 years ago)
Author:
katerina
Message:

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_calls.c

    r473 r481  
    262262  errno = error;
    263263
    264   if (flag_err_debug == SL_TRUE)
     264  if (flag_err_debug == S_TRUE)
    265265    {
    266266      char ipbuf[SH_IP_BUF];
     
    291291  sh_ipvx_save(serv_addr, ss.ss_family, (struct sockaddr *) &ss);
    292292
    293   if (flag_err_debug == SL_TRUE)
     293  if (flag_err_debug == S_TRUE)
    294294    {
    295295      char ipbuf[SH_IP_BUF];
     
    490490#endif
    491491
    492   SL_ENTER(_("retry_msleep"));
    493 
    494492  errno  = 0;
    495493  if (millisec > 999) millisec = 999;
     
    511509#else
    512510  if (sec > 0)
    513     {
    514       sleep (sec); /* nanosleep not available */
    515     }
    516   else
    517     {
     511    sleep (sec); /* nanosleep not available */
     512  else {
    518513#ifdef HAVE_USLEEP
    519       if (millisec > 0)
    520         {
    521           usleep(1000 * millisec);
    522         }
     514    if (millisec > 0)
     515      usleep(1000 * millisec);
    523516#else
    524       if (millisec > 0)
    525         {
    526           sleep (1);
    527         }
    528 #endif
    529     }
    530 #endif
    531   SL_RETURN(result, _("retry_msleep"));
     517    if (millisec > 0)
     518      sleep (1);
     519#endif
     520  }
     521#endif
     522  return result;
    532523}
    533524
     
    835826 
    836827/*@noreturn@*/
    837 void aud_exit (const char * file, int line, int fd)
     828void aud_exit (const char * file, int line, int exitval)
    838829{
    839830  if (sh.flag.audit != 0 && (sh.flag.aud_mask & AUD_EXIT) != 0)
    840831    sh_error_handle ((-1), file, line, 0, MSG_AUD_EXIT,
    841                       (long) fd);
     832                      (long) exitval);
    842833
    843834  SL_ENTER(_("aud_exit"));
    844835
    845   sh.flag.exit = fd;
    846   exit(fd);
     836  sh.flag.exit = exitval;
     837  exit(exitval);
    847838}
    848839
    849840/*@noreturn@*/
    850 void aud__exit (const char * file, int line, int fd)
     841void aud__exit (const char * file, int line, int exitval)
    851842{
    852843  if (sh.flag.audit != 0 && (sh.flag.aud_mask & AUD_EXIT) != 0)
    853844    sh_error_handle ((-1), file, line, 0, MSG_AUD_EXIT,
    854                       (long) fd);
     845                      (long) exitval);
    855846
    856847  SL_ENTER(_("aud__exit"));
    857848
    858   sh.flag.exit = fd;
    859   _exit(fd);
     849  sh.flag.exit = exitval;
     850  _exit(exitval);
    860851}
    861852
Note: See TracChangeset for help on using the changeset viewer.