-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'd like to know if there's a way to get the number of seconds since the UNIX epoch in any POSIX compliant shell, without resorting to non-POSIX languages like perl, or using non-POSIX extensions like GNU awk's strftime function.
Here are some solutions I've already ruled out...
date +%s //…
>>> More
-
as seen on Super User
- Search for 'Super User'
Under Ubuntu 8.10, bash shell, the LANG and LC_ALL variables are not set:
user@machine1:~$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
Where…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
posix does not appear when I run php -m cmd, however, I see it from the phpinfo() –enable-posix=shared on Linux with Plesk 9.
Basically, I can't use posix_*() functions as described at
http://www.php.net/manual/en/ref.posix.php
this shows doesn't exists:
if (function_exists(‘posix_getuid’)) {
echo…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
In a linux application I'm using pipes to pass information between threads.
The idea behind using pipes is that I can wait for multiple pipes at once using poll(2). That works well in practice, and my threads are sleeping most of the time and only wake up if there is something to do for them.
On…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi
Do you know about any good library wrapping posix and linux functions and structures ( eg. sockets or file descriptors ) into C++ classes? For example I'm thinking about a base FileDescriptor class and some inheriting classes ( unix sockets etc ) with methods like write, read or even some syscalls…
>>> More