ERRSTR(2) System Calls Manual ERRSTR(2)NAME
errstr, werrstr - description of last system call error
SYNOPSIS
#include <u.h>
#include <libc.h>
int errstr(char *err)
void werrstr(char *fmt, ...)
DESCRIPTION
When a system call fails it returns -1 and records a string describing the error in a per-process buffer. Errstr swaps the contents of
that buffer with the contents of the array err. Err should contain at least ERRLEN characters (defined in <libc.h>). Usually errstr will
be called with an empty string, but the exchange property provides a mechanism for libraries to set the return value for the next call to
errstr.
If no system call has generated an error since the last call to errstr with an empty string, the result is an empty string.
The verb r in print(2) calls errstr and outputs the error string.
Werrstr takes a print style format as its argument and uses it to format a string to pass to errstr. The string returned from errstr is
discarded.
SOURCE
/sys/src/libc/9syscall
/sys/src/libc/9sys/werrstr.c
DIAGNOSTICS
Errstr always returns 0.
SEE ALSO intro(2), perror(2)ERRSTR(2)
Check Out this Related Man Page
PERROR(2) System Calls Manual PERROR(2)NAME
perror, syslog - system error messages
SYNOPSIS
#include <u.h>
#include <libc.h>
void perror(char *s)
void syslog(int cons, char *logname, char *fmt, ...)
DESCRIPTION
Perror produces a short error message on the standard error file describing the last error encountered during a call to the system. First
the argument string s is printed, then a colon, then the message and a newline. If s is 0, only the error message and newline are printed.
Syslog logs messages in the file named by logname in the directory /sys/log; the file must already exist and should be append-only. Log-
name must contain no slashes. The message is a line with several fields: the name of the machine writing the message; the date and time;
the message specified by the print(2) format fmt and any following arguments; and a final newline. If cons is set or the log file cannot
be opened, the message is also printed on the system console. Syslog can be used safely in multi-threaded programs.
SOURCE
/sys/src/libc/port/perror.c
/sys/src/libc/9sys/syslog.c
SEE ALSO intro(2), errstr(2), the %r format in print(2)BUGS
Perror is a holdover; the %r format in print(2) is preferred.
PERROR(2)
Hello;
I was trying to set up a mysql database using following script, but never went through. The code seems fine without any syntax error as I tested it:
perl -c Brapa0101-db.pl
Brapa0101-db.pl syntax OKHowever, whenever I run it, an error message was tossed out:
DBD::mysql::st execute... (7 Replies)
Hello All,
I'm trying to match some user input.
The User input will be a FULL Path, a Command/Script Name, and any options they choose...
I was able to get this to Match somewhat but I want to be able to print an Error if, for example, the user enters a trailing "/"
after the Command_name... (9 Replies)
Hello
I need your kind help for configuring email on Solaris 10 so I can send reports from the system to my management and my colleagues.
I have the IP address of the email server of my company and the port 2525. I went through many documents online with no luck.
Can any one help me... (4 Replies)
hi All,
i have to modify a shell script written in Perl. i have to use execute immediate within this. i have to create a temporary table but it should have name like ar_data_$mmyyyy , how can i achieve this?
any help on this would be highly appriciated. (6 Replies)
Hi Team,
I am trying to connect to database(succeeded ) and print the records on the browser using while loop. But the elements of array are not displayed instead while loop is displayed directly. Instead of the below I can embed html statements in print but I am looking for the below style as I... (1 Reply)
Need assistance
Below script get the output correctly
I want to convert the date format .Below is the output . Any idea ?
#!/usr/bin/perl -w
use DBI;
# Get a database handle by connecting to the database
my $db = DBI->connect(... (3 Replies)
Hi all,
I'm quite new to Solaris and I've been searching around everywhere to try and find the root of my Oracle DB install problem. It quits immediately when it runs isainfo when it gets a return of 3md64. To me this looks like there is a typo where ever isainfo pulls it's info from, but I... (13 Replies)
Hi, I just would like to write a perl script , this perl script do the following .
Check the parameter $data in a mysql database ( with user ID and password ) , if the $data is exist then return true , if not then return false , would advise how to write this script ? thanks
---------- Post... (1 Reply)
How do I find out the SSL cert info on the local server?
How do I know if an ssl cert is installed on local server?
How it was issued to?
Who was the issuer?
What's the expiration date?
Any other relevant information? (1 Reply)
Hi,
I am an occasional PERL user. I am trying to call a sub routine (passing parameters) in perl module from a driver .pl file. I have been "tinkering" for a while now and have confused myself.
Could someone please look at the code below and spot where I am going wrong.
testPerl.pl
... (0 Replies)
Hi,
I am currently writing a perl module that will be passed queries from other scripts and use DBI to execute them on an Oracle Database. The problem I have is when it comes to the return.
I am currently getting this from my code:
FIELDA FIELDB FIELDC ... (6 Replies)
Hello,
I am trying to write a perl script to access Solid LDAP database using JDBC.
The script connects to the database but gives below error while running sql prepare command :
try.pl
connecting
preparing................
DBD::JDBC::db prepare failed: java.io.IOException:... (0 Replies)
Hi All,
i have problem here whenever i run this perl script that is pasted here, it inserts a negative number in place of PO_nbr
.
What the script does is reads a pipe delimited file and then using some values on the file it will query db to get few other values and then it inserts the... (4 Replies)
Hallo Team
I can perform the task manually but i would like to automate this process. ok here goes. I have a perl script which runs every Wednesday every week and the name of the script is check_19.pl
This is how the script looks like :
#!/usr/bin/perl -w
#use strict;
use DBI;
#... (1 Reply)
Hello again people,
I currently searching for a code/script that will allow it to check if a specific port is open, lets say 123. Found a public script on a ftp but I dont know how and what to modify in it to suit my needs. (I think this is a evil code and I want to use it as an example).
... (3 Replies)