Changeset 138aa38 in rtems


Ignore:
Timestamp:
05/21/04 20:19:33 (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
c984fb3
Parents:
58accdd
Message:

2004-05-21 Joel Sherrill <joel@…>

PR 628/rtems

  • posix/src/killinfo.c, posix/src/pthreadkill.c, posix/src/ptimer1.c, posix/src/sigaction.c, posix/src/sigaddset.c, posix/src/sigsuspend.c: Signal set of 0 is supposed to return EINVAL. In addition timer_create needed to return an error if the clock was not CLOCK_REALTIME.
Location:
cpukit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r58accdd r138aa38  
     12004-05-21  Joel Sherrill <joel@OARcorp.com>
     2
     3        PR 628/rtems
     4        * posix/src/killinfo.c, posix/src/pthreadkill.c, posix/src/ptimer1.c,
     5        posix/src/sigaction.c, posix/src/sigaddset.c, posix/src/sigsuspend.c:
     6        Signal set of 0 is supposed to return EINVAL.  In addition
     7        timer_create needed to return an error if the clock was not
     8        CLOCK_REALTIME.
     9
    1102004-05-21  Joel Sherrill <joel@OARcorp.com>
    211
  • cpukit/posix/src/killinfo.c

    r58accdd r138aa38  
    6767
    6868  /*
    69    *  Validate the signal passed if not 0.
    70    */
    71 
    72   if ( sig && !is_valid_signo(sig) ) {
     69   *  Validate the signal passed.
     70   */
     71
     72  if ( !sig )
    7373    rtems_set_errno_and_return_minus_one( EINVAL );
    74   }
     74
     75  if ( !is_valid_signo(sig) )
     76    rtems_set_errno_and_return_minus_one( EINVAL );
    7577
    7678  /*
     
    7880   */
    7981
    80   if ( !sig || _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
     82  if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
    8183    return 0;
    8284  }
  • cpukit/posix/src/pthreadkill.c

    r58accdd r138aa38  
    3535  Objects_Locations  location;
    3636
    37   if ( sig && !is_valid_signo(sig) )
     37  if ( !sig )
     38    rtems_set_errno_and_return_minus_one( EINVAL );
     39
     40  if ( !is_valid_signo(sig) )
    3841    rtems_set_errno_and_return_minus_one( EINVAL );
    3942
  • cpukit/posix/src/ptimer1.c

    r58accdd r138aa38  
    272272  int               timer_pos; /* Position in the table of timers  */
    273273
     274  if ( clock_id != CLOCK_REALTIME )
     275    rtems_set_errno_and_return_minus_one( EINVAL );
     276
    274277 /*
    275278  *  The data of the structure evp are checked in order to verify if they
     
    284287       rtems_set_errno_and_return_minus_one( EINVAL );
    285288     }
     289
     290     if ( !evp->sigev_signo )
     291       rtems_set_errno_and_return_minus_one( EINVAL );
     292
     293     if ( !is_valid_signo(evp->sigev_signo) )
     294       rtems_set_errno_and_return_minus_one( EINVAL );
    286295  }
    287296
  • cpukit/posix/src/sigaction.c

    r58accdd r138aa38  
    4444
    4545  if ( !sig )
    46     return 0;
     46    rtems_set_errno_and_return_minus_one( EINVAL );
    4747
    4848  if ( !is_valid_signo(sig) )
  • cpukit/posix/src/sigaddset.c

    r58accdd r138aa38  
    3333
    3434  if ( !signo )
    35     return 0;
     35    rtems_set_errno_and_return_minus_one( EINVAL );
    3636
    3737  if ( !is_valid_signo(signo) )
  • cpukit/posix/src/sigsuspend.c

    r58accdd r138aa38  
    22 *  3.3.7 Wait for a Signal, P1003.1b-1993, p. 75
    33 *
    4  *  COPYRIGHT (c) 1989-1999.
     4 *  COPYRIGHT (c) 1989-2004.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    2222#include <rtems/posix/pthread.h>
    2323#include <rtems/posix/psignal.h>
     24#include <rtems/seterr.h>
    2425
    2526int sigsuspend(
     
    4243  (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
    4344
     45  /*
     46   * sigtimedwait() returns the signal number while sigsuspend()
     47   * is supposed to return -1 and EINTR when a signal is caught.
     48   */
     49  if ( status != -1 )
     50    rtems_set_errno_and_return_minus_one( EINTR );
     51
    4452  return status;
    4553}
Note: See TracChangeset for help on using the changeset viewer.