Skip to main content

Python module to check for system call numbers

Project description

What is it?

This is very simple code to get system call numbers from Python level.

Usage

Quite simple:

#!/usr/bin/python3

import syscalls

system_calls = syscalls.syscalls()

for test_call in ['openat', 'osf_uadmin', 'nosuchcall']:
    try:
        print(f"System call '{test_call}' has number: {system_calls[test_call]}")
    except syscalls.NoSuchSystemCall:
        print(f"No such system call '{test_call}' on any architecture")
    except syscalls.NotSupportedSystemCall:
        print(f"System call '{test_call}' is not supported on this "
              "architecture")

for test_call in ['openat', 'osf_uadmin', 'nosuchcall']:
    try:
        print(f"System call '{test_call}' on arm64 has number: "
              f"{system_calls.get(test_call, 'arm64')}")
    except syscalls.NoSuchSystemCall:
        print(f"No such system call '{test_call}' on any architecture")
    except syscalls.NotSupportedSystemCall:
        print(f"System call '{test_call}' is not supported on this "
              "architecture")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for system-calls, version 5.15.1
Filename, size File type Python version Upload date Hashes
Filename, size system_calls-5.15.1-py3-none-any.whl (124.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size system-calls-5.15.1.tar.gz (52.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page