Questions tagged [sysv]

For Unix-related questions specific to System V IPC, System V init, SVID, etc.

System V is a branch of commercal Unix operating systems, with SVR4 (System V Release 4) being the most succesful and most widely ported version. Modern System V systems include Oracle Solaris, IBM AIX, HP-UX, and others.

System V IPC primitives (message queue, semaphore, shared memory) had been standardized in POSIX and Single Unix Specification.

73 questions
4
votes
1 answer

Run Jar file on Ubuntu at system startup

I'm trying to get a .jar file to run at startup on an Ubuntu machine, but I'm not getting anywhere. I've tried the instructions here https://askubuntu.com/questions/99232/how-to-make-a-jar-file-run-on-startup-and-when-you-log-out , and I've tried…
Alex Bunn
  • 390
  • 1
  • 5
  • 19
4
votes
3 answers

sysv shared memory, will it be destroyed automatically?

Will shared memory allocated in Unix get destroyed automatically if you don't do that ? e.g one process created that segment, another process take use of it. now they're both crashed for some reason, was that segment causing a memory leak ?
daisy
  • 22,498
  • 29
  • 129
  • 265
3
votes
0 answers

How to properly override generated systemd unit file to start after a ZFS mount has mounted

I'm using Ubuntu 18.04.4 LTS which uses systemd, but the squid package packaged with this version of Ubuntu is configured to start via init.d. It starts and runs via systemctl start squid.service if I start it manually after the system has…
3
votes
2 answers

Do C compilers guarantee two eightbyte field structs will be passed as INTEGER on SysV x64?

Specifically in the context of the SysV x86-64 ABI If I have a struct with only two fields, such as: typedef struct { void *foo; void *bar; } foobar_t; And I pass it to a function with a definition like so: foobar_t…
nickelpro
  • 2,537
  • 1
  • 19
  • 25
3
votes
1 answer

Starting Docker daemon with sysVinit

at the moment I work with ARM64 based Debian Images and docker. I want to automate the docker daemon on boot so we do not have to start it manually. But the Images do not use the systemd but good old sysVinit. So I though "quite easy - simple an…
dotChris
  • 51
  • 5
3
votes
1 answer

Bash script not executing as expected on system boot

I have created a bash script inside /etc/init.d on raspbian jessie - pixel. The script is as follow: auto_announce #! /bin/bash #/etc/init.d/auto_announce ### BEGIN INIT INFO # Provides: auto_announce # Required-Start: $remote_fs…
3
votes
1 answer

When using RHEL's `daemon` init.d function, how do you capture the PID?

This is a followup to RedHat daemon function usage. In the accepted solution the author states "$! is not usable when using [the function] daemon [sourced from /etc/rc.d/init.d/functions]". So my followup question is about getting the PID. If you…
Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177
3
votes
1 answer

Solve with SaltStack: initctl: `Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused`

I got the following error when I attempted "vagrant up" on the standard ubuntu/vivid64 with virtualbox: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused The full error stream is here:…
Nathan Basanese
  • 8,475
  • 10
  • 37
  • 66
3
votes
2 answers

Figuring out what startpar.c (sysvinit) is doing

OK here's a long one, brace yourself! :) Recently I tried launching a watchdog script written in bash, during boot. So I added a line to rc.local containing the following: su someuser -c "/home/someuser/watchdog.sh &" the watchdog.sh looks like…
Ivan Kovacevic
  • 1,322
  • 12
  • 30
3
votes
1 answer

nested lock/free calls in shared memory synchronization using semaphores

[EDIT] Complete rewrite with added Background (original question below) In an application running in PHP I used shared memory to store values temporarily for performance reasons (database has too much overhead and files are too slow). I built a…
Johannes H.
  • 5,875
  • 1
  • 20
  • 40
3
votes
2 answers

Spring Boot (Tomcat) based application as daemon - howto stop?

I wrote a Spring Boot webservice that uses an embedded tomcat as container. In case the system reboots I want to backup some information to a mysql database. In my webservice I use @Scheduled() and @PreDestroy to run the backup. This goes well…
Alex
  • 1,141
  • 1
  • 13
  • 24
2
votes
1 answer

C Shared memory existing flag?

I have seen that question on SO already but it wasn't clear to me the following case: A shm has been created. So if I call in my case: int shmid = shmget(key, sizeof(struct messageQueue), IPC_CREAT | S_IRWXU | IPC_EXCL); shmid turns -1 if the shm…
lightyears99
  • 101
  • 7
2
votes
1 answer

Convert binutils `size` output from "sysv" format (`size --format=sysv my_executable`) to "berkeley" format (`size --format=berkeley my_executable`)

I'd like to know how to get this berkeley format output: $ size --format=berkeley /bin/ls text data bss dec hex filename 124042 4728 4832 133602 209e2 /bin/ls From this sysv format output: $ size --format=sysv…
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
2
votes
0 answers

PHP: extension sysvmsg

i use on my one personaly project simple queue implemented by msg function. This a specific function msg_receive which is used to wait for a message to come to the queue. Once in a while, this wait crashes with a return error code 43 without an…
h4kuna
  • 23
  • 4
2
votes
0 answers

"unable to set key on lock" while attaching memory with native key in qt

I'm trying to learn how to share memory between Qt and Non-Qt application while having read-write access from both. For now I'm trying to create and then attach already created memory in Qt using native key. While the program can successfully create…
Elveman
  • 21
  • 2