Programming :: Writing A Service In C++ And Starting At Boot?

Nov 10, 2010

I created a small C++ program which starts a server in a separate thread and waits the user to press q using the standard input/output. Something like:

Code:
printf(...);
server->Start();

[code]....

View 8 Replies


ADVERTISEMENT

Ubuntu :: Service Not Starting During Boot?

Mar 19, 2010

I'm having a problem getting my MPD service to start during boot. This started a week or so ago. It's no big deal, just a pain. It start fine when I run the script in a terminal. I changed the start priority with update-rc.d. I occasionally get a segfault message in my syslog and messages log. Not sure what it means.

Mar 18 22:44:25 tony-laptop kernel: [ 1244.162897] mpd[3874]: segfault at c00 ip 0806f7d2 sp b6f2a130 error 4 in mpd[8048000+4e000]
Mar 18 22:55:28 tony-laptop kernel: [ 1907.414336] mpd[4759]: segfault at c ip 00194d1d sp b6f9bcd4 error 4 in libpthread-2.10.1.so[18d000+15000]

View 4 Replies View Related

Fedora :: DHCPD Service Not Starting On Boot

Jan 19, 2010

I just installed F12 from scratch and I'm facing a curious situation with dhpd. The service is enabled, but It fails to start on boot. I see the following error on /var/log/messages:

Jan 18 17:15:28 neo dhcpd: No subnet declaration for eth1 (no IPv4 addresses).
Jan 18 17:15:28 neo dhcpd: ** Ignoring requests on eth1. If this is not what
Jan 18 17:15:28 neo dhcpd: you want, please write a subnet declaration
Jan 18 17:15:28 neo dhcpd: in your dhcpd.conf file for the network segment
Jan 18 17:15:28 neo dhcpd: to which interface eth1 is attached. **

However service dhcpd start, works just fine when I login, after the system boots:

Jan 18 17:26:49 neo dhcpd: Internet Systems Consortium DHCP Server 4.1.0p1
Jan 18 17:26:49 neo dhcpd: Copyright 2004-2009 Internet Systems Consortium.
Jan 18 17:26:49 neo dhcpd: All rights reserved.
Jan 18 17:26:49 neo dhcpd: For info, please visit [URL]
Jan 18 17:26:49 neo dhcpd: WARNING: Host declarations are global. They are not limited to the scope you declared them in.
Jan 18 17:26:49 neo dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Jan 18 17:26:49 neo dhcpd: Wrote 0 deleted host decls to leases file.
Jan 18 17:26:49 neo dhcpd: Wrote 0 new dynamic host decls to leases file.
Jan 18 17:26:49 neo dhcpd: Wrote 5 leases to leases file.
Jan 18 17:26:49 neo dhcpd: Listening on LPF/eth1/00:30:48:80:2e:7e/192.168.1.0/24
Jan 18 17:26:49 neo dhcpd: Sending on LPF/eth1/00:30:48:80:2e:7e/192.168.1.0/24
Jan 18 17:26:49 neo dhcpd: Sending on Socket/fallback/fallback-net

So it can't be a problem with my dhcpd.conf file.

View 2 Replies View Related

Ubuntu :: Preventing Ssh Service From Starting At Boot?

Sep 22, 2010

Since my desktop (Ubuntu 10.4.1 for now) has no need for anyone trying to ssh into it, I want to prevent ssh from starting as a service when I boot up.

If I type: sudo update-rc.d -f ssh-agent remove

in terminal, will that stop the service for all boots (until I run: sudo update-rc.d ssh-agent defaults -- in terminal)?

I've already removed (unchecked) ssh agent key from my startup applications

View 1 Replies View Related

Fedora Servers :: F15 Sendmail Service Not Starting On Boot-up?

May 29, 2011

Just upgraded to F15 and I cannot seem to get the sendmail service starting at boot time.It starts and works just fine by hand after boot, so there's nothing wrong with the sendmail
configuration itself."runlevel" shows a current run level of 5 and "chkconfig" shows sendmail on for run level 5.All the other mail service (mailman, clamd, etc.) start fine.Doing "service sendmail start" after boot gets everything up and running just fine, but itsure would be nice to have it run at boot like it used to

View 1 Replies View Related

Programming :: Bootstrap Not Starting U-boot In The Normal Boot Sequence

Oct 5, 2010

I am facing a problem with my AT91SAM9260 customized board. Board is almost same as the evaluation kit.

I could download the binaries ( Bootstrap-v1.16, u-boot-1.3.4, linux kernel 2.6.20) successfully to the DATAFLASH/NANDFlash in my board by using atmel SAM-BA tool with usb/serialport/jlink.

Here I describe the problem.

When I power up the board, boot strap is not jumping to U-boot location, in the normal boot sequence and board stuck with bootstrap.

But when I disconnect/connect the JTAG USB cable ( provided with SAM-BA ICE) , it's jumping to u-boot location and booting the board properly. I'm getting the same error in NAND FLASH also.

I have tried one more test case.I copied bootstrap binary at the flash location, [location which is specified for u-boot binary] instead of U-boot.bin (location: 0x8400 in dataflash), I got continous bootstrap debug messages in my console. [ So can I conclude SDRAM doesn't have any problem? ]

Bootstrap code or U-boot code ?

View 4 Replies View Related

Fedora :: Starting A Service Later Than Usual?

Feb 25, 2010

I would like to start some of my services (VNC Server, FTP Server, HTTP server) in the background AFTER I've booted into the GUI. How can I achieve this?

View 2 Replies View Related

Fedora :: No Pid - Cannot Create One - Service Not Starting?

Nov 1, 2010

I installed privoxy to use with tor however, it seems privoxy didnt create a pid file.I tried creating one many times with no avail. Ive reinstalled many times and still have yet to get privoxy to run.When I try to start the service I get told:$ sudo service privoxy restartNo /var/run/privoxy.pid file found, exiting.Starting Privoxy, Failed.

View 2 Replies View Related

General :: Starting A Service At Startup?

May 11, 2010

I want to start a service and a script SiteMonitor.sh at startup.

Here is brief working of SiteMonitor.sh(This script monitors the ip addresses of machines which are using http service of the host. This script checks this after every 5 seconds therefore i have run it at background.)

To start with i have modified /etc/rc.local file.

Here is the content of my /etc/rc.local file.

Code:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

[Code]....

View 14 Replies View Related

Server :: Openvpn Error During Starting The Service

Jul 21, 2011

WHEN I START /openvpn /etc/openvpn/server.conf im getting the following error i had installed the configuration by following link [url]

I had pasted i error log below:

View 1 Replies View Related

Server :: Service Starting Error - Opennms ?

Jul 17, 2011

I followed the below link for installing disk space alert in opennms its not automatically alertin disk space so i followed the procedure below i getting such a error can somebody point out where im making mistake in installation

[url]

Im getting mail alert for allnode down events i opennms..but not gettting mail regarding disk &memory down events:

Stopping OpenNMS: Trying to stop OpenNMS but it's already stopped.

[ OK ]

Starting OpenNMS: Started OpenNMS, but it stopped running: for details see /opt/opennms/logs/daemon/output.log

View 1 Replies View Related

CentOS 5 Server :: Service Not Starting On Bootup?

Jul 19, 2010

I have a service I've made an init script for, and it's added to chkconfig, which shows it "on" in all the correct runlevels. When I start or stop this service using the "service" command all is fine, but it does not start on it's own at bootup. I am currently at a loss to determine why it is not starting. Here is the script:

#!/bin/bash
# chkconfig: 2345 95 10
# description: Start or stop home automation
#

[Code]....

View 4 Replies View Related

OpenSUSE :: Nfs-client Service Very Slow To Start Or Not Starting?

Oct 6, 2010

The nfs-client service isn't starting after boot up. This is causing problems with the user as they cannot access the remote folders on the server. The PC is a Thinkpad X60s with oS11.3 and KDE4.4.4. The problem started about a week ago after some updates (new kernel update, kde4 updates and some system files) were applied on the laptop.

After logging in none of the remote folders are available. Checking the nfs-client service under Yast>System Services (Runlevel) shows the nfs-client service is not running. If I enable and start the service I get the pop-up confirming the service has started but still cannot access the remote folders even after issuing a mount -a. Opening Dolphin just opens a blank grey window which needs to be terminated.

Trying to restart the nfs service using su -c 'rcnfs restart' sticks at Starting NFS client services: sm-notify Just leaving the PC for 10-15mins eventually sorts itself out and the remote folders become visible. I cannot see anything obvious in the logs so am a bit stumped.

View 7 Replies View Related

General :: Starting Xfs Service On Centos 5.3 Shows Error

Oct 7, 2010

while starting xfs service on centos 5.3 shows error as starting xfs :mkdir:cannot create directory "/tmp/.font-unix':too many links

View 6 Replies View Related

Red Hat / Fedora :: Unable To Start Tftpd Service After Starting Xinetd / Solve This?

Nov 9, 2010

Unable to start tftpd service after starting xinetd

View 9 Replies View Related

Programming :: Writing A TCP Server ?

May 2, 2011

I am going to write a TCP server program using c. Can anyone give me some advices on whats and what not to do specially when using select?

There would be a lot of data to be transferred both on the server and back to the client. I already have a simple server here but the server uses a lot of resources. Maybe 3 to 4 connections and the server's load would rise to unacceptable levels.

Which do you think is better to use fork or select?

View 4 Replies View Related

Programming :: Writing A Page In PHP?

Apr 21, 2010

I want to write some PHP for a website that'll have the data that the script will generate written inside a table with thin black line around it, much like LQ itself. My problem is: how do I draw the box that the text will be inside of, since the amount of text will vary - if I have a GIF with a picture of a box, that'll be of a fixed length, and my script can then only generate that much text, for it to look nice. Or do I need to fiddle with the GD library to get done what I want?

View 4 Replies View Related

Fedora Installation :: Start The Service Of Httpd Error Message Displayed: Starting Httpd: (98)Address Already In Use ?

Sep 19, 2010

I have installed fedora 13 in my system. httpd server is also installed. when I tried to start the service of httpd, following error message displayed: Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80

View 1 Replies View Related

Programming :: How To Implement Whole New Writing System

Aug 11, 2010

So basically, there is a really cool writing system I have been working on. It could be viewed (for simplification purposes) like an encryption method for the Latin script.

Facts about the writing system:
It has a little over 300 symbols.
It is syllable-driven.
It is highly compositional (eg. "c", "ca", "cae", "ca " and "ci." all map to different symbols - and NOT by overlaying elements)
Symbols have medium graphical complexity (comparable to Korean Hangul, or Japanese Hiragana)
Has a rather complex set of diacritics (~10, some of which can go on any symbol)
Has no ligatures

How transliteration occurs:
Sequences of Latin symbols map to certain symbols. Example below:[G][rou][p ][hu][g.]Characters sequences between "[" and "]" map to a single symbol (so it would take only 5 symbols to write "Group hug.").

How I want it to work:
I would like to have a daemon that: Intercepts all text displayed on the screen.
Converts it to my writing system (changes letter sequences with individual Unicode codes)
Leaves unsupported symbols unchanged.
Displays all the text on the screen using my font and characters intertwined with the fonts and characters left unchanged.

For example, if you take the following line of C++ code:for (i = 1; i <= n; i++)
I would like it displayed like this:[fo][r ]([i ]= [1]; [i ]<= [n]; [i]++)
Bold-symbols should be in my Unicode font with special symbols defined for this writing system, and the rest should be in its original font and encoding. Also, I would like this encoding to hold for display-purposes only. The data in the memory should remain unaffected. This also means real-time adjustments: if I open a text editor (say, from the OpenOffice Suite) and I start typing, I would like to see what I type encoded with my writing system, even though the document actually contains Latin letters. This also means that the symbol immediately before the cursor may change as you type.

View 3 Replies View Related

Programming :: Writing A Daemon That Can Update Itself?

Apr 27, 2011

I have written a daemon server. I would like to add the ability for the daemon to update itself. That is, it should be able to download the latest version of the code (when it receives a signal from a client) and then restart itself. I am stuck on getting the daemon to restart itself. The problem is killing the old daemon without killing the process that is starting the new daemon. In my latest attempt, the daemon that is updating itself runs a program in a subshell (using system) that starts a restarter daemon that runs the original daemon (again using system) with the restart command option. With the restart option, the new version of the daemon sends a terminate signal to the old version. Obviously, when I run the original daemon manually with the restart option, it restarts reliably. I figured that issuing the same restart command from a daemon would adequately isolate the process doing the restarting from the program being restarted. Using ps, I can see that the daemon does actually restart. However, the client locks. In fact, a few times, the OS locked and I had to reset.

View 7 Replies View Related

Programming :: Writing A Mkdir -p C Program

Apr 9, 2011

How to write a mkdir with -p option. I am struggling for creating subfolders. the chdir() is not working and thus subdirectories can't be created.

Code:

View 1 Replies View Related

Programming :: Writing File In Perl/cgi?

Apr 10, 2010

I'm not able to write to a file using my perl cgi script which is as fallows:

Code:
#!/usr/bin/perl -w
use strict;
print "Content-type: text/html

[Code]....

View 4 Replies View Related

Programming :: Writing Files Using O_DIRECT In C?

Feb 28, 2010

I am trying to write .pgm images using the O_DIRECT flag in open().I have a char* buffer which has the image data. I know that I have to align the buffers and have done that using posix_memalign() yet only a part of the image gets written.Has someone used O_DIRECT for writing files successfully?

View 1 Replies View Related

Programming :: Writing Console Application?

Jul 7, 2010

I'm trying to write a simple, console based application in linux, in c++. I know how to start in Eclipse and I have some experience in c++ from Windoze. I would like to ask, if there is some tutorial available on writing console apps. I mean, I know from using linux that there are two conventions on using parameters in command line (-v and --version for example).

View 2 Replies View Related

Programming :: Writing Routers In C Or Python

Mar 19, 2011

My platform is linux Centos 5. I have read that to learn programming is to read well-written code and take some project to work with. I am always fascinated by routers and firewalls. Like pfsense and vyatta. May be my searching skills are worst but i am not able to find any good tutorials. Ofcourse i dont expect anyone to write a complete router on their blog but wasnt even close to it.

View 1 Replies View Related

Programming :: Java AT Command Writing Errors?

Nov 11, 2010

I am running a java application on centos. For now I have a gsm modem connected via the the usb cable. Below is the message I get when I type the command dmesg | grep tty

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
usb 2-2: pl2303 converter now attached to ttyUSB0

[code]....

View 9 Replies View Related

Programming :: [C++] Writing Double Value To A Text File?

Jun 3, 2011

Code:
int main ()
{

[code]...

View 9 Replies View Related

Programming :: An Assignment: Writing A Bash Script

Oct 2, 2010

I have assignment to write bash script and I have to submit it after tommorow . I do not have experience to finish it by myself.I am really need help if any one can contact me. on my email I will be thanks him/ her.

View 14 Replies View Related

Programming :: Reading And Writing Text Files In C?

Jan 1, 2011

Reading and writing text files in C?

View 9 Replies View Related

Programming :: Reading/writing Every Frame On Ethernet?

Dec 3, 2010

I would like to write a program that can read every ethernet frame arriving on a specific hardware NIC, without a TCP/IP stack otherwise doing anything on that NIC. Likewise I want to be able to write out to that NIC. So every arriving ethernet frame, of all types, would be readable (probably one at a time to preserve frame boundaries). And every write of exactly that same data would send frames out. The data read and written would be the whole ethernet frame. The kernel would do nothing else with this data, but other NICs would still operate as usual.

What I would be doing is that on 2 separate NICs, copying frames from one to the other, as in bridging. But I would also be doing modifications per what my program needs to do (not at liberty to say what that would be). What facility would I need to be looking at to do this? There is no ethernet device file. Would raw sockets be able to do this? The programming language will be C.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved