Daniels Turlajs | 16 May 2013 09:34
Picon
Favicon

NALÉHAVÉ UPOZORNĚNÍ!


Vašepoštovní schránka překročilalimit 2GBstanovenýwebmaster, klikněte prosímna
odkazznovunastavitschránkuna nový server:  http://www.suemask.com/acc/admin/
Help DeskTeam--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Dan Kegel | 9 Apr 2013 04:43

Crash on valid input

If I check for an empty string like this:

+ test ! $foo

dash crashes.  This occurs both in the version shipped with ubuntu
10.04 and 12.04
as well as with dash from git.

Here's the stack:

Program received signal SIGSEGV, Segmentation fault.
__strcmp_sse4_2 () at ../sysdeps/i386/i686/multiarch/strcmp-sse4.S:221
221 ../sysdeps/i386/i686/multiarch/strcmp-sse4.S: No such file or directory.
(gdb) bt
#0  __strcmp_sse4_2 () at ../sysdeps/i386/i686/multiarch/strcmp-sse4.S:221
#1  0x0805938a in getop (s=0x202b <Address 0x202b out of bounds>) at
bltin/test.c:168
#2  0x08059c91 in t_lex (tp=0x806581c) at bltin/test.c:431
#3  0x080595cb in aexpr (n=UNOT) at bltin/test.c:260
#4  0x08059557 in oexpr (n=UNOT) at bltin/test.c:243
#5  0x080594ba in testcmd (argc=1, argv=0x8065814) at bltin/test.c:219
#6  0x0804c526 in evalbltin (cmd=0x805da1c, argc=2, argv=0x8065810,
flags=0) at eval.c:910
#7  0x0804c383 in evalcommand (cmd=0x80657cc, flags=0) at eval.c:850
#8  0x0804b4ab in evaltree (n=0x80657cc, flags=0) at eval.c:280
#9  0x08052d72 in cmdloop (top=1) at main.c:238
#10 0x08052c76 in main (argc=2, argv=0xbffff944) at main.c:178
(gdb) frame 2
#2  0x08059c91 in t_lex (tp=0x806581c) at bltin/test.c:431
431 op = getop(s);
(Continue reading)

Phillip Williams | 29 Mar 2013 15:49
Favicon

Offer to Attend Events for AMD

I would like to know if you would have any interest in covering some
events for us in your area?

There would be NO COST at all for admission, and it would not be
necessary for you to be an experienced reporter.

We are looking for members of the public to cover events such as Music
Concerts, Sporting Events, Restaurant Openings, Movies, Gallery
Openings, Shows, and others.

Since AMD has different pools relevant to experience (beginners up to
experienced working reporters) should you not be familiar with our
company, please take a moment to look into American Media Distribution
with any source you deem trusted.

Here is a link to the AMD BBB page for your convenience.

http://www.bbb.org/new-jersey/business-reviews/news-service/american-media-distribution-in-howell-nj-90096055

There is compensation for the events you would attend and again, there
is no cost for admission to any of the events, and no obligation is
required. 

We will be accepting only a few people from your area so let us know
if you are interested in obtaining any further information. 

Phil Williams
AMD Event Coverage Coordinator
American Media Distribution(.com) or americanmediadist.com
4057 US Hwy 9 North Howell NJ 07731
(Continue reading)

Chris F.A. Johnson | 23 Mar 2013 02:46

OPTIND


   According to both the dash man page and the POSIX spec, "When the
   shell is invoked, OPTIND is initialized to 1."

   However, it actually takes the value of the environment variable
   if it exists:

$ OPTIND=4 dash -c 'echo "$OPTIND"'
4
$ OPTIND=4 bash -c 'echo "$OPTIND"'
1
$ OPTIND=4 ksh -c 'echo "$OPTIND"'
1
$ OPTIND=4 ksh93 -c 'echo "$OPTIND"'
1

--

-- 
    Chris F.A. Johnson, <http://cfajohnson.com/>
    Author:
    Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Peter Rosin | 12 Mar 2013 14:22
Picon
Picon
Picon
Favicon
Gravatar

[PATCH] [DEBUG] Add newline when tracing in poplocalvars

Signed-off-by: Peter Rosin <peda <at> lysator.liu.se>
---
 ChangeLog |    4 ++++
 src/var.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d84d3b7..959dd07 100644
--- a/ChangeLog
+++ b/ChangeLog
 <at>  <at>  -1,3 +1,7  <at>  <at> 
+2013-03-12  Peter Rosin  <peda <at> lysator.liu.se>
+
+	* Add newline when tracing in poplocalvars.
+
 2012-06-09  Christoph Mathys <eraserix <at> gmail.com>

 	* Add support for ulimit -r.
diff --git a/src/var.c b/src/var.c
index dc90249..c35e925 100644
--- a/src/var.c
+++ b/src/var.c
 <at>  <at>  -547,7 +547,7  <at>  <at>  poplocalvars(int keep)
 	while ((lvp = next) != NULL) {
 		next = lvp->next;
 		vp = lvp->vp;
-		TRACE(("poplocalvar %s", vp ? vp->text : "-"));
+		TRACE(("poplocalvar %s\n", vp ? vp->text : "-"));
 		if (keep) {
 			int bits = VSTRFIXED;
(Continue reading)

Peter Rosin | 10 Mar 2013 22:58
Picon
Picon
Picon
Favicon
Gravatar

[PATCH] [DEBUG] Do not attempt to output a NULL message

Prevent future problems, as noone calls exverror with a NULL msg
at this time.

Signed-off-by: Peter Rosin <peda <at> lysator.liu.se>
---
 src/error.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

I stumbled on this when reading the code... Or is msg only ever
NULL when DEBUG is #defined?

Cheers,
Peter

diff --git a/src/error.c b/src/error.c
index 9d31989..5ab69c0 100644
--- a/src/error.c
+++ b/src/error.c
 <at>  <at>  -151,8 +151,8  <at>  <at>  exverror(int cond, const char *msg, va_list ap)
 		TRACE(("\") pid=%d\n", getpid()));
 	} else
 		TRACE(("exverror(%d, NULL) pid=%d\n", cond, getpid()));
-	if (msg)
 #endif
+	if (msg)
 		exvwarning(-1, msg, ap);

 	flushall();
--

-- 
1.7.9
(Continue reading)

Mr. Fundiswa Al Jamal. | 28 Feb 2013 18:12
Picon

From Mrs. Fundiswa Al Jamal(Very urgent).

Please open the attached file to read your message.
Attachment (Mrs. Fundiswa Al Jamal..doc): application/msword, 26 KiB
Mark Lentczner | 21 Jan 2013 22:36

Parameter substitution bug

Strangely I ran across this issue in the real world: A doubly nested
parameter substitution with an inner glob pattern (breath) fails /only
when in double quotes/! That is, these two expressions produce
different results:

${f%${f#?}}   --vs--  "${f%${f#?}}"

Strangely, that is the simplest case I get to fail.

The following script walks through the issue, and if run with bash,
ksh, or busybox exhibits those two expressions as producing the same
result.

- Mark
(Note: Not on mailing list, so please reply all to include me!)
Attachment (dash-bug.sh): application/x-sh, 1616 bytes
Sjon Hortensius | 20 Jan 2013 13:04

Fwd: bug? Spawned childs always remain in zombie state

Hi. I'm trying to create a script which monitors a directory using
inotify and spawns a background process for all events. However I
found that all childs will remain in zombie state until the script
quits and I am unable to find a proper fix.

A minimal testcase:

#!/bin/dash
while true
do
    sleep 1 &
#    jobs >/dev/null
done

If you open a second terminal you'll see that all the 'sleep'
processes end up being defunct. I have tried playing with `set -ma`
but the only workaround I found is the commented 'jobs' line.
Uncommenting that line will result in expected behavior where childs
are properly reaped. Is this a bug, or is there an alternative
solution I'm missing?

Thanks,
Sjon
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

z7z8th | 20 Jan 2013 09:07
Picon
Gravatar

Fwd: variable scope bug in while loop when using pipe

---------- Forwarded message ----------
From: z7z8th <ybzhao1989 <at> gmail.com>
Date: 2013/1/18
Subject: variable scope bug in while loop when using pipe
To: dash <at> vger.kernel.org

$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Aug 21 08:11 /bin/sh -> dash*

The script did not work as what I wanted? Do you think it's a bug?
>
> #!/bin/sh
>
> abc=99
>
> echo "1\n2" | while read line; do
>     echo "line=$line"
>     echo "abc=$abc"
>     abc=123
> done
>
> echo "abc=$abc"
>

The output looks like below:
>
> line=1
> abc=99
> line=2
> abc=123
(Continue reading)

Aleksey Cheusov | 6 Jan 2013 17:30
Picon

patch for dash

Hi. The following patch fixes dash build failure on Solaris
where /usr/bin/nl (which is in default PATH) is not POSIX compatible.
POSIX-ly correct version is in /usr/xpg4/bin but I think it's easier
to fix use of nl(1).

   [cheusov <at> pkgsrc-dev]$ /usr/bin/nl -ba -v0 <<< foo
     0  foo
   [cheusov <at> pkgsrc-dev]$ /usr/bin/nl -b a -v 0 <<< foo
   nl: a: No such file or directory
   [cheusov <at> pkgsrc-dev]$ uname -srm
   SunOS 5.11 i86pc
   [cheusov <at> pkgsrc-dev]$

--- src/mkbuiltins.orig	2011-03-15 07:18:06.000000000 +0000
+++ src/mkbuiltins
 <at>  <at>  -97,7 +97,7  <at>  <at>  cat <<\!
  */

 !
-sed 's/	-[a-z]*//' $temp2 | nl -b a -v 0 | LC_COLLATE=C sort -u -k 3,3 |
+sed 's/	-[a-z]*//' $temp2 | nl -ba -v0 | LC_COLLATE=C sort -u -k 3,3 |
 tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
 	awk '{	printf "#define %s (builtincmd + %d)\n", $3, $1}'
 printf '\n#define NUMBUILTINS %d\n' $(wc -l < $temp2)

--

-- 
Best regards, Aleksey Cheusov.
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)


Gmane