Displaying 9 results from an estimated 9 matches for "decode_sign".
Did you mean:
decode_signal
2019 Jan 25
0
[klibc:update-dash] trap: Implement POSIX.1-2008 trap reset behaviour
...SIX.1-2008 trap reset behaviour
Jonathan Perkin submitted a patch to fix the behaviour of trap
when the first argument is an integer. Currently it is treated
as a command while POSIX requires it to be treated as a signal.
This patch is based on his idea but instead of adding an extra
argument to decode_signal I have added a new decode_signum helper.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/trap.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/usr/dash/trap...
2020 Mar 28
0
[klibc:update-dash] dash: trap: Implement POSIX.1-2008 trap reset behaviour
...5b6ed0a639e1a20b88906ddd7ef9b ]
Jonathan Perkin submitted a patch to fix the behaviour of trap
when the first argument is an integer. Currently it is treated
as a command while POSIX requires it to be treated as a signal.
This patch is based on his idea but instead of adding an extra
argument to decode_signal I have added a new decode_signum helper.
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/trap.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/usr/dash/trap...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...o, SIG_IGN);
}
- sigmode[signo - 1] = S_HARD_IGN;
+ if (!vforked)
+ sigmode[signo - 1] = S_HARD_IGN;
}
@@ -283,6 +288,9 @@ ignoresig(int signo)
void
onsig(int signo)
{
+ if (vforked)
+ return;
+
if (signo == SIGCHLD) {
gotsigchld = 1;
if (!trap[SIGCHLD])
@@ -455,6 +463,14 @@ int decode_signal(const char *string, int minsig)
return -1;
}
+void sigblockall(sigset_t *oldmask)
+{
+ sigset_t mask;
+
+ sigfillset(&mask);
+ sigprocmask(SIG_SETMASK, &mask, oldmask);
+}
+
/*
* Human-readable signal name
*/
diff --git a/usr/dash/trap.h b/usr/dash/trap.h
index a095b0e1..bbff184...
2020 Mar 28
0
[klibc:master] dash: README.dash: List the changes from upstream
...build, with a static config.h
+* Use of strtod() is guarded by HAVE_STRTOD, which we don't define
+* The built-in times command, which requires floating-point support, is
+ disabled
+* The signal_names[] array is replaced by a signal_name() function using
+ klibc's own signal name array. decode_signal() is changed similarly.
+* The read built-in implements the -t option like bash
+* mktokens is modified to support out-of-tree builds
+* mkbuiltins is modified to sort with LC_ALL=C
+* Some header files have header guards added
+* Changelog and some manual pages are omitted
+* Automatic whitespac...
2020 Mar 28
0
[klibc:update-dash] Revert " dash: mkbuiltins: Fix sort order harder"
...| 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/usr/dash/README.dash b/usr/dash/README.dash
index 11ecff54..e33335a5 100644
--- a/usr/dash/README.dash
+++ b/usr/dash/README.dash
@@ -15,7 +15,6 @@ Several changes have been made for klibc:
klibc's own signal name array. decode_signal() is changed similarly.
* The read built-in implements the -t option like bash
* mktokens is modified to support out-of-tree builds
-* mkbuiltins is modified to sort with LC_ALL=C
* Some header files have header guards added
* Changelog and some manual pages are omitted
* Automatic whitespac...
2020 Mar 28
0
[klibc:update-dash] dash: Change mktokens back to creating token.h itself
.../dash/README.dash b/usr/dash/README.dash
index e33335a5..f45d28be 100644
--- a/usr/dash/README.dash
+++ b/usr/dash/README.dash
@@ -14,7 +14,6 @@ Several changes have been made for klibc:
* The signal_names[] array is replaced by a signal_name() function using
klibc's own signal name array. decode_signal() is changed similarly.
* The read built-in implements the -t option like bash
-* mktokens is modified to support out-of-tree builds
* Some header files have header guards added
* Changelog and some manual pages are omitted
* Automatic whitespace fixups
diff --git a/usr/dash/mktokens b/usr/da...
2019 Jan 25
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...f
+
sh_warnx("getcwd() failed: %s", strerror(errno));
return nullstr;
}
diff --git a/usr/dash/trap.c b/usr/dash/trap.c
index 1e2a8677..182fa7ac 100644
--- a/usr/dash/trap.c
+++ b/usr/dash/trap.c
@@ -395,48 +395,45 @@ out:
/* NOTREACHED */
}
-/*
- * Decode a signal name
- */
int decode_signal(const char *string, int minsig)
{
- int i;
+ int signo;
if (is_number(string)) {
- i = atoi(string);
- if (i >= NSIG) {
+ signo = atoi(string);
+ if (signo >= NSIG) {
return -1;
}
- return i;
+ return signo;
}
- for ( i = minsig ; i < NSIG ; i++ ) {
- if ( sys_siga...
2020 Mar 28
0
[klibc:update-dash] dash: Fix some cosmetic differences from upstream dash
...f
+
sh_warnx("getcwd() failed: %s", strerror(errno));
return nullstr;
}
diff --git a/usr/dash/trap.c b/usr/dash/trap.c
index 1e2a8677..182fa7ac 100644
--- a/usr/dash/trap.c
+++ b/usr/dash/trap.c
@@ -395,48 +395,45 @@ out:
/* NOTREACHED */
}
-/*
- * Decode a signal name
- */
int decode_signal(const char *string, int minsig)
{
- int i;
+ int signo;
if (is_number(string)) {
- i = atoi(string);
- if (i >= NSIG) {
+ signo = atoi(string);
+ if (signo >= NSIG) {
return -1;
}
- return i;
+ return signo;
}
- for ( i = minsig ; i < NSIG ; i++ ) {
- if ( sys_siga...
2005 Dec 28
1
Problems with klibc 1.1.8
...ying to build klibc 1.1.8 on x86 fails on my machine as follows:
KLIBCCC dash/trap.o
KLIBCCC dash/output.o
dash/trap.c: In function 'trapcmd':
dash/trap.c:94: warning: unused parameter 'argc'
dash/trap.c:94: warning: unused parameter 'argv'
dash/trap.c: In function 'decode_signal':
dash/trap.c:398: error: 'SIGRTMIN' undeclared (first use in this
function)
dash/trap.c:398: error: (Each undeclared identifier is reported only
once
dash/trap.c:398: error: for each function it appears in.)
dash/trap.c:399: error: 'SIGRTMAX' undeclared (first use in this
fun...