Joachim Breitner
Joachim Breitner

Reputation: 25762

What unit is used in python’s resource RLIMIT_FSIZE setting

According to the docs, with Python you can set the file size limit with:

resource.setrlimit(resource.RLIMIT_FSIZE,(fileseeklimit,fileseeklimit))

but it is not clear what the unit is here.

The Bash builtin ulimit uses kilobytes for everything.

Upvotes: 1

Views: 985

Answers (1)

Cᴏʀʏ
Cᴏʀʏ

Reputation: 107536

The RLIMIT_FSIZE here is a number of bytes.

A comment in the header file where that enum is defined says this:

/* Largest file that can be created, in bytes.  */

Upvotes: 2

Related Questions