Changeset 2491

Show
Ignore:
Timestamp:
02/05/07 21:59:03 (2 years ago)
Author:
dhozac
Message:

Fix the last, horribly broken commit.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/Makefile-files

    r2467 r2491  
    211211src_vkill_SOURCES               =  src/vkill.c 
    212212src_vkill_LDADD                 =  $(VSERVER_LDADDS) 
    213 src_vkill_LDFLAGS               =  $(VSERVER_LDFLGS) 
     213src_vkill_LDFLAGS               =  $(VSERVER_LDFLGS) $(LIBINTERNAL) 
    214214src_vkill_CPPFLAGS              =  $(AM_CPPFLAGS) -DLEGACYDIR=\"$(legacydir)\" 
    215215 
  • trunk/src/vkill.c

    r2489 r2491  
    153153#else // VC_ENABLE_API_LEGACY 
    154154inline static int 
    155 kill_wrapper(xid_t xid, char const *pid, int sig) 
    156 
     155kill_wrapper(xid_t xid, char const *pid_s, int sig) 
     156
     157  pid_t pid; 
     158  long  tmp; 
     159 
     160  if (!isNumber(pid_s, &tmp, true)) { 
     161    WRITE_MSG(2, "vkill: '"); 
     162    WRITE_STR(2, pid_s); 
     163    WRITE_MSG(2, "' is not a number\n"); 
     164  } 
     165  pid = (pid_t) tmp; 
     166 
    157167  if (xid==VC_NOCTX) 
    158168    xid = vc_get_task_xid(pid); 
    159   if (vc_ctx_kill(xid,atoi(pid),sig)==-1) { 
     169  if (vc_ctx_kill(xid,pid,sig)==-1) { 
    160170    perror("vkill: vc_ctx_kill()"); 
    161171    return 1;