LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Example: sig-handler funcs for C and C++ (throw-catch) PART 2

Posted 05-13-2012 at 11:37 PM by rainbowsally
Updated 05-14-2012 at 07:39 AM by rainbowsally (possible cpu hang if -O2 switch is used)

UPDATE:
Note: The signal-handler files can't be compiled with the -O2 switch and it's probably best if you only trap the signals you really intend to redirect, such as SIGSEGV (11). If you compile what we have here with the -O2 switch your cpu may hang if you try to exit using Ctrl-C for example. See implementation notes added to signal-handler.c below.

See part 1 for main functions to test this in C and C++.

To throw and catch stuff like segfaults in C++ it's...
Member
Posted in Uncategorized
Views 1056 Comments 0 rainbowsally is offline
Old

Example: sig-handler funcs for C and C++ (throw-catch) PART 1

Posted 05-13-2012 at 11:22 PM by rainbowsally

Today's Features
  • THROW-CATCH in C
  • Translating signals to C++ throw-catch parameters.

To compile the C++ example these vars are set in mc2.def and should be similar for other methods of building it.
Code:
COMPILE = g++ -m32 -c -o # COMPILE <output_file> ...
CFLAGS = -Wall -g3 --save-temps
# or CFLAGS = -Wall -O2 # optimized
INCLUDE = -I $(SRCDIR) -I$(PREFIX)/include 

LINK = g++ -m32 -o # LINK <output_file> ...
LDFLAGS = #
...
Member
Posted in Uncategorized
Views 1022 Comments 0 rainbowsally is offline
Old

How to tar files through scripting?

Posted 05-12-2012 at 10:02 AM by anky.parmar1786

I am newbie in scripting. Made a script but not executing properly. I want to take tar backup of files of first 15 days of the month that is 1st to 15th May. Files are in this format -->> 01May2012 to 15May2012

The script is given below.. Please help me to make this correct

today=`date '+%d%B%Y' -d '-11days'`
cd /opt/Server.Log_11Ocg01
tar -cvf backups1to11.tar /opt/Server.Log_11Ocg01/$today

Thanks
Ankit
LQ Newbie
Posted in Uncategorized
Views 384 Comments 0 anky.parmar1786 is offline
Old

Old SUSE Linux in VBox

Posted 05-11-2012 at 08:25 PM by wagscat123
Updated 05-11-2012 at 08:27 PM by wagscat123

I've ran and test SUSE 7.1 and 7.3 and later in VirtualBox. Here's some notes about each
-2001-
7.1 - Offers KDE 1.1 and 2.0 and Kernel 2.2/2.4. GNOME 1.2. Only 640x480 with 16 colors with XFree86 4. Includes as both Sax1 and SaX2 and Yast1 and YaST2. You may have to fight the sound server, but it works well once you have it fired up. This is the only one older than 9.2 I installed from an Install CD instead of an FTP server.
7.3 - KDE 2.2 and GNOME 1.4. Same video resolution and...
Member
Posted in Uncategorized
Views 732 Comments 0 wagscat123 is offline
Old

Misadventures In Computer Mad Science

Posted 05-11-2012 at 06:25 AM by rainbowsally
Updated 05-11-2012 at 06:29 AM by rainbowsally

Misadventures In Computer Mad Science

A friend of mine once told me that I'm the worst programmer he knew. And that's probably right. What do you expect from someone who's first programming love was Forth (ZX-81 and Co-Co).

So I always encourage folks to see what is going on and perhaps rework or clean up my messes if they can see a better way to do things.

Features:
  • Half a paragraph from the GPL v.3

See highlights near the bottom if you're...
Member
Posted in Uncategorized
Views 344 Comments 0 rainbowsally is offline

  



All times are GMT -5. The time now is 05:43 AM.

Main Menu

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration