sin
ef57a609ca
Exit with error 125 if the process is killed by a signal
2014-01-06 18:05:52 +00:00
sin
2dc105ebbc
Use saved errno in case weprintf() fails internally
2014-01-04 14:07:34 +00:00
sin
567869a8fe
Check the exit status and return it from the parent process
2014-01-04 14:02:40 +00:00
sin
7ec616e1e5
Exit with proper error codes
...
We still have a few error codes to do, namely when the process
is killed or stopped by a signal or when one or more invocations
of the command returned a nonzero exit status.
2014-01-04 13:53:59 +00:00
sin
9a1c5783c1
Remove mktemp(1) from TODO
...
We already have mktemp(1) implemented.
2014-01-04 13:41:47 +00:00
sin
18f9f3e141
Remove xargs(1) from TODO
...
We already have a barebones version.
2014-01-04 13:40:42 +00:00
sin
4bdf9a9658
Add initial version of xargs(1)
2014-01-04 00:04:05 +00:00
sin
71cbd12ede
Revert "Fix relocation error on OpenBSD (amd64) when compiling with pcc"
...
This reverts commit 06d43e4832
.
Let's stick to the most basic and common options for the default
case.
2013-12-21 13:39:29 +00:00
sin
1851c02a95
Show usage instead of exiting silently on an invalid option
2013-12-12 13:30:25 +00:00
sin
aff51008ea
Add -R as a synonym to -r for cp(1)
...
List the available options in the usage line as well.
2013-12-12 13:30:17 +00:00
sin
7f6d5653c6
Add -R as a synonym to -r for rm(1)
...
Some scripts require this.
2013-12-12 13:15:47 +00:00
sin
544857623b
Add -n support to sort(1)
2013-12-12 13:10:59 +00:00
sin
0b6b84886c
Add newline at end of file
2013-12-04 17:42:33 +00:00
sin
5534e60703
Implement -G support for id(1)
2013-12-01 17:29:53 +00:00
Rob Pilling
d453be2ae1
id(1) can handle uid arguments
2013-12-01 14:29:16 +00:00
Rob Pilling
fd8c3b6438
curproc() isn't needed in id(1)
2013-12-01 14:29:01 +00:00
sin
dac77d3089
Add support to display user and group info for any user
...
Currently we only handle login names - it should be trivial to
fix to allow for parsing UIDs as well.
2013-12-01 10:43:56 +00:00
sin
137ebef3ac
Factor out code printing information for the current process
2013-12-01 10:43:29 +00:00
sin
f1f0fba630
Forgot to remove argc from function decl
...
Thanks FRIGN for noticing this.
2013-11-30 21:12:40 +00:00
sin
38ca9a24c2
Be a bit more consistent and use uint8_t instead of unsigned char
2013-11-30 20:59:09 +00:00
sin
abd5a0e573
We do not name parameters in declarations
2013-11-30 20:58:49 +00:00
sin
7808f4161d
Implement -m for mkfifo(1)
2013-11-30 20:58:15 +00:00
sin
651dbdd700
Rename __ARG_H__ to ARG_H__
...
__* is reserved so do not use it.
2013-11-25 21:29:20 +00:00
sin
7a2105f5bd
Forgot to update manpage for mktemp(1)
2013-11-14 19:50:07 +00:00
sin
91a643411d
Check for TMPDIR and if set use it
2013-11-14 19:47:22 +00:00
sin
a7b8eee6c0
Add dsp@2f30.org to LICENSE
2013-11-14 19:01:08 +00:00
sin
ee8084cec0
Fix indentation
2013-11-14 19:00:52 +00:00
sin
078fce3f77
Always print the program name
...
This is generally very useful for sbase, especially when we
hit some case that is not implemented and we want to know which
program failed.
2013-11-14 19:00:28 +00:00
sin
3b3dffd24f
_brk, _argc and _argv are reserved for the implementation
...
Thanks to nsz@port70.net for reporting this, the mail excerpt below.
"actually __.* and _[A-Z].* are reserved for any usage and _.* is
reserved for file scope identifiers"
We just rename them to brk_, argc_ and argv_.
2013-11-14 10:44:56 +00:00
sin
56a62c605f
Implement -q support for mktemp(1)
2013-11-13 15:27:41 +00:00
sin
b8edf3b4ee
Add weprintf() and replace fprintf(stderr, ...) calls
...
There is still some programs left to be updated for this.
Many of these programs would stop on the first file that they
could not open.
2013-11-13 11:41:43 +00:00
sin
34f7a688cb
Add barebones mktemp(1)
2013-11-13 11:06:55 +00:00
sin
80c5ab46ba
Fix style for function definitions
2013-11-12 13:37:38 +00:00
sin
8f931fba13
Remove passwd from TODO
...
This cannot be made portably so we'll implement this in ubase.
2013-11-12 13:12:42 +00:00
sin
8fdfa7caeb
Convert cksum(1) to use FILE * instead of an fd
...
In sbase we generally do I/O through FILE * instead of file
descriptors directly.
Do not error out on the first file that can't be opened.
2013-11-12 11:17:08 +00:00
sin
cfe5e9ef3a
Support tail-ing multiple files
2013-11-12 10:47:22 +00:00
sin
d9abff1e84
Don't exit on the first file that can't be opened for head and fold
2013-11-12 10:46:53 +00:00
sin
7add068ade
Rename brk' to
_brk' to avoid polluting the namespace
2013-11-12 10:18:18 +00:00
dsp
3f9e501f6b
Add ARGNUM and ARGNUMF(base)
...
This is useful to support the obsolete syntax -NUM for tools like
head, tail and fold.
2013-11-12 10:17:52 +00:00
sin
2046778bc9
Update manpage for binary operations in test(1)
2013-11-11 12:01:47 +00:00
sin
18fbd4606c
Return false in case we invoke `test s1' and s1 is the null string
2013-11-11 12:00:22 +00:00
sin
c23616555b
Add support for -k (checking sticky bit) to test(1)
2013-11-11 11:56:32 +00:00
sin
11c078d116
Fix styling issue in test(1)
2013-11-11 11:54:04 +00:00
sin
af1fb0c9c2
Inverse condition to avoid nesting in test(1)
2013-11-11 11:48:54 +00:00
sin
c55948ba91
No need to use USED() in arg.h for sbase
...
Tested on Linux and OpenBSD (with gcc and pcc).
2013-11-07 10:06:12 +00:00
sin
777f958426
Update TODO
...
We are not going to support logname(1).
2013-10-29 17:20:13 +00:00
sin
06d43e4832
Fix relocation error on OpenBSD (amd64) when compiling with pcc
...
ld: util.a(eprintf.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC
util.a: could not read symbols: Bad value
*** Error 1 in . (Makefile:114 'basename': @pcc -o basename basename.o util.a -g)
*** Error 1 in /home/sin/repos/sbase (Makefile:104 'binlib')
2013-10-28 10:45:11 +00:00
sin
b2a0362bf8
Use estrtol() instead of atoi()
2013-10-27 09:49:08 +00:00
Markus Wichmann
298703ff2d
Add sticky bit to documentation.
2013-10-20 10:41:32 +01:00
Markus Wichmann
a55cc8c95e
Make chmod and ls recognize sticky bit (S_ISVTX).
2013-10-20 10:41:32 +01:00