Changeset 2733

Show
Ignore:
Timestamp:
07/11/08 17:24:03 (4 months ago)
Author:
dhozac
Message:

prctl does not work as well as this. Revert changeset 2731.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vlogin.c

    r2731 r2733  
    3939#include <pty.h> 
    4040#include <fcntl.h> 
    41 #include <sys/prctl.h> 
    4241 
    4342#define ENSC_WRAPPERS_PREFIX    "vlogin: " 
     
    198197} 
    199198 
    200 void do_vlogin(int UNUSED argc, char *argv[], int ind) 
     199void do_vlogin(int argc, char *argv[], int ind) 
    201200{ 
    202201  int slave; 
    203202  pid_t pid; 
    204   int n
     203  int n, i
    205204  fd_set rfds; 
    206205 
     
    254253 
    255254  /* set process title for ps */ 
    256   prctl(PR_SET_NAME, (unsigned long) "login"); 
     255  n = strlen(argv[0]); 
     256 
     257  for (i = 0; i < argc; i++) 
     258    memset(argv[i], '\0', strlen(argv[i])); 
     259 
     260  strncpy(argv[0], "login", n); 
    257261 
    258262  /* we want a redraw */