Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programm funktioniert unter Linux, Segfault unter OpenBSD

Empfohlene Antworten

Obwohl ich kein C-Programmierer bin, habe ich mir mit Google's Hilfe ein kleines Programm gebacken, das vom Webserver als CGI ausgeführt werden soll. Unter Linux funktioniert das prima, unter OpenBSD produziert es jedoch einen "Segmentation Fault".

Hat jemand eine Idee, woran das liegen könnte ?

#include <stdio.h>


int main(void)

{

    printf("Status: 301\n");

    printf("Location: https://meineseite.com/users/%s/\n",getenv("REMOTE_USER"));

    return 0;

}

Kompiliert wurde es jeweils mit (statisch für ein Chroot):
gcc --static -o index.cgi index.c

  • Autor

Natürlich neu kompiliert.

Ein Kollege hier konnte zu meiner Überraschung doch C und hat mich auf "man getenv" unter OpenBSD hingewiesen. Dort steht, das man noch stdlib.h includen muß, was man unter Linux nicht braucht.

Damit gehts jetzt auch :D

Natürlich neu kompiliert.

Ein Kollege hier konnte zu meiner Überraschung doch C und hat mich auf "man getenv" unter OpenBSD hingewiesen. Dort steht, das man noch stdlib.h includen muß, was man unter Linux nicht braucht.

Müsste doch eigentlich einen Fehler ausgeben, wenn man unter BSD kompiliert und da ne Header fehlt. :confused:

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.