[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: and another diff... trailing slashes



Regarding the two patches that Juergen has sent recently, here are
alternative patches that are much simpler and should also be more
compatible.

filesys.c: AFAIK, GEMDOS never strips trailing (back)slashes so that
Fopen ("nondir\\", 0) should always return EPTHNF.  This way, ls -l
symlink/ will work correctly, too.

signal.c: This patch has the advantage that signal(SIGCONT, xx) still
returns SIG_IGN after signal(SIGCONT, SIG_IGN), instead of SIG_DFL as
with Juergen's patch.  This is compatible with Unix (at least SunOS
and Linux).


--- filesys.c~	Tue Aug 30 17:55:44 1994
+++ filesys.c	Thu Feb 23 13:03:52 1995
@@ -751,6 +751,11 @@
 
 	while (*path) {
 
+	/* 
+	 * skip slashes
+	 */
+		while (DIRSEP(*path)) path++;
+
 	/* now we must have a directory, since there are more things in the path */
 		if ((xattr.mode & S_IFMT) != S_IFDIR) {
 PATH2COOKIE_DB(("relpath2cookie: not a directory, returning EPTHNF"));
@@ -792,11 +797,6 @@
 			break;
 		}
 
-
-	/* 
-	 * skip trailing slashes
-	 */
-		while (DIRSEP(*path)) path++;
 
 PATH2COOKIE_DB(("relpath2cookie: looking up [%s]", lastname));
 
--- signal.c~	Mon Nov 14 21:09:14 1994
+++ signal.c	Thu Feb 23 13:03:05 1995
@@ -70,7 +70,8 @@
  * specially (see supexec() in xbios.c, for example).
  */
 /* If the process is traced, the tracer should always be notified. */
-	if (sig == 0 || (p->sighandle[sig] == SIG_IGN && !p->ptracer))
+	if (sig == 0 || (p->sighandle[sig] == SIG_IGN && !p->ptracer &&
+			 sig != SIGCONT))
 		return;
 
 /* if the process is already dead, do nothing */

-- 
Andreas Schwab                                      "And now for something
schwab@issan.informatik.uni-dortmund.de              completely different"