* sigproc.cc (_pinfo::set_ctty): Move function
* pinfo.cc (_pinfo::set_ctty): to here. * fhandler_mem.cc (fhandler_dev_mem::fstat): Don't fill out structure if this is an on-disk device rather than an "auto" device. * fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto. * path.cc (normalize_posix_path): Don't treat a standalone '//' as introducing a UNC path. (normalize_win32_path): Ditto.
This commit is contained in:
		| @@ -1,3 +1,16 @@ | ||||
| 2005-02-26  Christopher Faylor  <cgf@timesys.com> | ||||
|  | ||||
| 	* sigproc.cc (_pinfo::set_ctty): Move function | ||||
| 	* pinfo.cc (_pinfo::set_ctty): to here. | ||||
|  | ||||
| 	* fhandler_mem.cc (fhandler_dev_mem::fstat): Don't fill out structure | ||||
| 	if this is an on-disk device rather than an "auto" device. | ||||
| 	* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto. | ||||
|  | ||||
| 	* path.cc (normalize_posix_path): Don't treat a standalone '//' as | ||||
| 	introducing a UNC path. | ||||
| 	(normalize_win32_path): Ditto. | ||||
|  | ||||
| 2005-02-26  Christopher Faylor  <cgf@timesys.com> | ||||
|  | ||||
| 	* debug.cc (delete_handle): Report on handle value in debugging output. | ||||
|   | ||||
| @@ -402,12 +402,15 @@ int | ||||
| fhandler_dev_mem::fstat (struct __stat64 *buf) | ||||
| { | ||||
|   fhandler_base::fstat (buf); | ||||
|   buf->st_mode = S_IFCHR; | ||||
|   if (wincap.has_physical_mem_access ()) | ||||
|     buf->st_mode |= S_IRUSR | S_IWUSR | | ||||
| 		    S_IRGRP | S_IWGRP | | ||||
| 		    S_IROTH | S_IWOTH; | ||||
|   buf->st_blksize = getpagesize (); | ||||
|   if (is_auto_device ()) | ||||
|     { | ||||
|       buf->st_mode = S_IFCHR; | ||||
|       if (wincap.has_physical_mem_access ()) | ||||
| 	buf->st_mode |= S_IRUSR | S_IWUSR | | ||||
| 			S_IRGRP | S_IWGRP | | ||||
| 			S_IROTH | S_IWOTH; | ||||
|     } | ||||
|  | ||||
|   return 0; | ||||
| } | ||||
|   | ||||
| @@ -86,17 +86,21 @@ fhandler_dev_raw::fstat (struct __stat64 *buf) | ||||
| { | ||||
|   debug_printf ("here"); | ||||
|  | ||||
|   if (get_major () == DEV_TAPE_MAJOR) | ||||
|     buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; | ||||
|   else | ||||
|     buf->st_mode = S_IFBLK | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; | ||||
|   fhandler_base::fstat (buf); | ||||
|   if (is_auto_device ()) | ||||
|     { | ||||
|       if (get_major () == DEV_TAPE_MAJOR) | ||||
| 	buf->st_mode = S_IFCHR | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; | ||||
|       else | ||||
| 	buf->st_mode = S_IFBLK | STD_RBITS | STD_WBITS | S_IWGRP | S_IWOTH; | ||||
|  | ||||
|   buf->st_uid = geteuid32 (); | ||||
|   buf->st_gid = getegid32 (); | ||||
|   buf->st_nlink = 1; | ||||
|   buf->st_blksize = S_BLKSIZE; | ||||
|   time_as_timestruc_t (&buf->st_ctim); | ||||
|   buf->st_atim = buf->st_mtim = buf->st_ctim; | ||||
|       buf->st_uid = geteuid32 (); | ||||
|       buf->st_gid = getegid32 (); | ||||
|       buf->st_nlink = 1; | ||||
|       buf->st_blksize = S_BLKSIZE; | ||||
|       time_as_timestruc_t (&buf->st_ctim); | ||||
|       buf->st_atim = buf->st_mtim = buf->st_ctim; | ||||
|     } | ||||
|   return 0; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -230,7 +230,7 @@ normalize_posix_path (const char *src, char *dst, char *&tail) | ||||
| 	*tail++ = '/'; | ||||
|     } | ||||
|   /* Two leading /'s?  If so, preserve them.  */ | ||||
|   else if (isslash (src[1]) && !isslash (src[2])) | ||||
|   else if (isslash (src[1]) && src[2] && !isslash (src[2])) | ||||
|     { | ||||
|       *tail++ = '/'; | ||||
|       *tail++ = '/'; | ||||
| @@ -1023,7 +1023,7 @@ normalize_win32_path (const char *src, char *dst, char *&tail) | ||||
|   bool beg_src_slash = isdirsep (src[0]); | ||||
|  | ||||
|   tail = dst; | ||||
|   if (beg_src_slash && isdirsep (src[1])) | ||||
|   if (beg_src_slash && isdirsep (src[1]) && src[2]) | ||||
|     { | ||||
|       *tail++ = '\\'; | ||||
|       src++; | ||||
|   | ||||
| @@ -373,6 +373,14 @@ _pinfo::set_ctty (tty_min *tc, int flags, fhandler_tty_slave *arch) | ||||
|     } | ||||
| } | ||||
|  | ||||
| /* Test to determine if a process really exists and is processing signals. | ||||
|  */ | ||||
| bool __stdcall | ||||
| _pinfo::exists () | ||||
| { | ||||
|   return this && !(process_state & PID_EXITED); | ||||
| } | ||||
|  | ||||
| bool | ||||
| _pinfo::alive () | ||||
| { | ||||
|   | ||||
| @@ -195,14 +195,6 @@ pid_exists (pid_t pid) | ||||
|   return pinfo (pid)->exists (); | ||||
| } | ||||
|  | ||||
| /* Test to determine if a process really exists and is processing signals. | ||||
|  */ | ||||
| bool __stdcall | ||||
| _pinfo::exists () | ||||
| { | ||||
|   return this && !(process_state & PID_EXITED); | ||||
| } | ||||
|  | ||||
| /* Return true if this is one of our children, false otherwise.  */ | ||||
| static inline bool __stdcall | ||||
| mychild (int pid) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user